Skip to content

✨ Add a configmap to handle the proxy ca bundle #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

zhujian7
Copy link
Member

@zhujian7 zhujian7 commented Dec 17, 2024

Summary

This is a follow-up of PR #760, in this PR, it will handle the ca bundle for proxy config, a configmap containing the ca bundle will be created and mounted to the agent deployments/daemonsets. and the mounted ca bundle file path will be injected as the environment CA_BUNDLE_FILE_PATH to the deployments/daemonsets. Addon developers can use the environment to get the ca bundle data.

Related issue(s)

#761

Fixes #

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 82.51748% with 25 lines in your changes missing coverage. Please review.

Project coverage is 63.74%. Comparing base (6d3184a) to head (1f3a44c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/addon/templateagent/decorator.go 87.50% 9 Missing and 4 partials ⚠️
pkg/addon/templateagent/template_agent.go 69.23% 8 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #772      +/-   ##
==========================================
+ Coverage   63.60%   63.74%   +0.13%     
==========================================
  Files         192      192              
  Lines       18433    18563     +130     
==========================================
+ Hits        11725    11833     +108     
- Misses       5735     5750      +15     
- Partials      973      980       +7     
Flag Coverage Δ
unit 63.74% <82.51%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhujian7 zhujian7 changed the title Add a configmap to handle the proxy ca bundle ✨ Add a configmap to handle the proxy ca bundle Dec 17, 2024
@zhujian7
Copy link
Member Author

/cc @qiujian16 @elgnay

@openshift-ci openshift-ci bot requested review from elgnay and qiujian16 December 18, 2024 08:01
Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

some nit comments.

@@ -331,27 +334,34 @@ func (d *imageDecorator) decorate(pod *corev1.PodTemplateSpec) error {
return nil
}

type proxyDecorator struct {
type objectsInjector interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments on each interface.


pc, ok := proxyConfig.(addonapiv1alpha1.ProxyConfig)
if !ok {
klog.InfoS("proxy config value is invalid", "value", proxyConfig)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a warning? also it is better to use the contextual logger.

Copy link
Contributor

openshift-ci bot commented Dec 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, zhujian7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zhujian7 zhujian7 force-pushed the proxy-ca-bundle branch 2 times, most recently from 380504b to 12c3a40 Compare December 19, 2024 01:47
Signed-off-by: zhujian <[email protected]>
@elgnay
Copy link
Contributor

elgnay commented Dec 19, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 19, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 3f9b886 into open-cluster-management-io:main Dec 19, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants