-
Notifications
You must be signed in to change notification settings - Fork 74
Bug 2015493: [OCPCLOUD-1306] User CA bundle sync controller #136
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
Bug 2015493: [OCPCLOUD-1306] User CA bundle sync controller #136
Conversation
|
/cc @JoelSpeed @elmiko |
JoelSpeed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I've added some stylistic go idiom stuff, but otherwise nothing to add. Very nitty review, sorry 😅 Please swap all the Expect(err).To(Succeed() for Expect(err).NotTo(HaveOccurred())
cmd/config-sync-controllers/main.go
Outdated
| Client: mgr.GetClient(), | ||
| Scheme: mgr.GetScheme(), | ||
| Recorder: mgr.GetEventRecorderFor("cloud-controller-manager-operator-config-sync-controller"), | ||
| Recorder: mgr.GetEventRecorderFor("cloud-controller-manager-operator-cloud-config-sync-controllers"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"cloud-controller-manager-operator-config-sync-controllers"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is another controller. https://github.com/openshift/cluster-cloud-controller-manager-operator/pull/136/files#diff-1b5385a70b9fc88e69ee8b33229144a2c42b3a4182d16c0045ba543d6d9af027R132 this one for ca sync. Should it be same recorder?
| return systemTrustBundlePath | ||
| } | ||
|
|
||
| func (r *TrustedCABundleReconciler) getSystemTrustBundle() ([]byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wonder if we can cache these bytes somewhere. I'm sure that the system trust bundle won't be changed, but decoding that every time is resource-intensive.
No necessary to do it right now, it's just an idea.
|
/retest |
| - name: trusted-ca | ||
| mountPath: /etc/pki/ca-trust/extracted/pem | ||
| readOnly: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be marked optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, since system CA will be written to this config-map anyway.
|
/retest |
|
/test e2e-azure-ccm |
|
/approve |
In order to add more similar controllers within this binary, cloud-config-sync-controller binary renamed to config-sync controller
Introduce separate controller for sync `user-ca-bundle` from `openshift-config` namespace to target CCCMO namespace for use user defined certificate authority during communication with cloud-provider
|
@lobziik: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/retest |
Fedosin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Fedosin, JoelSpeed The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@lobziik: All pull requests linked via external trackers have merged: Bugzilla bug 2015493 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/bugzilla-refresh |
|
/cherry-pick release-4.9 |
|
@lobziik: #136 failed to apply on top of branch "release-4.9": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Separate controller for syncing user defined ca bundle (seed doc: https://docs.openshift.com/container-platform/4.8/networking/configuring-a-custom-pki.html#nw-proxy-configure-object_configuring-a-custom-pki) to CCM namespace for merge it with FCOS system bundle and usage in CCM as trusted CA.
Implementation logic mostly got from
cluster-network-operatorone.Notes:
cloud-config-sync-controllerbinary was renamed toconfig-sync-controllersuser-ca-bundleis invalid, only system one will be used.