Implementing Proxy CA Bundle validation.#342
Implementing Proxy CA Bundle validation.#342openshift-merge-robot merged 2 commits intoopenshift:masterfrom ricardomaraschini:proxy-ca-bundle-check
Conversation
adambkaplan
left a comment
There was a problem hiding this comment.
Good start here - there have been a few updates in the design that need to be factored in.
|
fyi there's a canonical example of doing the "watch this file for changes and then restart the operator" here: |
|
/assign @adambkaplan |
|
/retest |
|
@ricardomaraschini two items before this is ready for review/merge:
|
Adding github.com/openshift/library-go/pkg/operator/watchdog to our vendor directory. In order to use watchdog package we need to update the following other packages to different versions: - github.com/prometheus/client_golang - k8s.io/apiserver - k8s.io/kube-openapi - sigs.k8s.io/structured-merge-diff The versions were copied from openshift/cluster-kube-controller-manager-operator repository as it already includes a watchdog implementation.
|
@adambkaplan Commits squashed/renamed as requested. |
|
As for reference, the deployment of the sidecar will be made as: We also need to make sure both containers share the same process namespace by specifying |
There was a problem hiding this comment.
A few nits.
I'd also go ahead and add the sidecar container to the image registry operator. This should watch the file /usr/share/pki/ca-trust-source/ca-bundle.pem (or watch the entire directory if that is an option).
EDIT: this can be done in the manifest YAML manifests/07-operator.yaml
adambkaplan
left a comment
There was a problem hiding this comment.
/approve
I'm holding this until the key name for the CA trust bundle is finalized. Otherwise looks good!
|
/retest |
There was a problem hiding this comment.
/hold cancel
We need to land this first. I'll then update #340 so that the operator and the file watcher share the trusted-ca mount.
This patch implements a command line argument to make registry operator to work as a sidecar. This sidecar monitors for changes on the filesystems and sends a kill signal to registry operator in case of changes on local files. As the watchdog package uses process name when locating the right process to kill we are creating a link to have two names for the same binary. This patch also adds the Trusted CA bundle config map as a dependency when deploying the operands. As package watchdog has a helper for Cobra command this patch also migrates the logic in main to leverage Cobra.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adambkaplan, ricardomaraschini 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 |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
Upgrade passed in CI here, but this change seems to have broken ART upgrade tests in 4.2. I've hijacked rhbz#1727080 to cover this (the CVO doesn't do a good job bubbling the cause up, so this is almost certainly different from what that Bugzilla was originally about). You may want to revert until you have time to figure out and fix whatever's wrong with the ART nightlies. |
|
It looks like the dockerfile change (which added the symlink) did not get sync'd to distgit. Will need to discuss w/ ART but i'll revert this for now to get us back to green. |
|
@ricardomaraschini @adambkaplan this PR needed to update Dockerfile.rhel7 in addition to Dockerfile, that is why the ART release jobs (which use the .rhel7 file) were broken by this PR even though it passed CI (which, I guess, use the plain Dockerfile). |
|
fyi @ricardomaraschini @adambkaplan I took a slightly different approach for adding trusted ca support to ingress operator: openshift/cluster-ingress-operator#334 /cc @bparees |
@danehans by which you mean you built a filewatcher into the operator process and have the operator terminate itself when the file changes (which will cause the pod to be restarted)? That seems fine to me. |
|
@danehans I like it! |
This patch adds a sidecar command line parameter to the registry operator. This sidecar will be deployed with the operator and will constantly monitor for changes on the mounted config map, restarting the operator every time the certificate content changes.
It is a big PR as it includes needed updates for the following packages: