-
Notifications
You must be signed in to change notification settings - Fork 585
Add Trusted CA to Proxy API type #377
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
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this was my proposal but i'd like to see @derekwaynecarr or another architect second it before we make it official.
also this presumably means the installer has to be able to collect CAs from the user and populate this field+configmap during install.
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.
@abhinavdahiya what are your thoughts on the installer requirements @bparees highlights above?
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.
the configmap is useful when it can be used as a volume to a pod. like the cloudproviderconfig configmap..
For most consumers of this api, that's not possible.. and most of them will need to fetch (latest) proxy object (latest) configmap and then make the request using proxy..
this also means that configmap contents can change and clients need to be reacting to that too..
so personally i think since CAs are not secret, the bundle in the object itself is more ergonomic, but depends if @deads2k and other approvers agree if that's a good API design.
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.
The value in making it a configmap reference is that we have numerous places in our cluster config resources where we need a list of CAs. Making it a reference to a configmap allows an admin to share those CAs if they so choose. Requiring the CAs be part of each resource (proxy config, build config, image config, etc) requires duplicating the values.
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.
in anycase @abhinavdahiya i think the real question to you is, do you foresee issues w/ the installer collecting CAs and populating additional cluster config w/ the CA values (in addition to the proxy config the installer was already going to be collecting and populating)
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.
don't we need to copy it into every operator's namespace anyway to mount it? I wasn't aware you can mount a configmap from another namespace.
Anyway this is not the data being mounted as it is not in a directly consumable form. This data is going to be aggregated along w/ the system CAs, into a new config map in openshift-config-managed that has the structure of /etc/pki. If there is value in having that configmap have a static name, we can do so.
Because you don't believe we'd have reason to reuse the same CA configmap in multiple places? We already have APIs that consume CAs via a configmap reference, so if this API does not also do that, we are ensuring people must duplicate their CAs.
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.
Instead of a ConfigMap this really needs to be the CA string for bootstrap. In the bootstrap process the CA will need to be added the host's ca trust before trying to pull the images.
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.
nevermind
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.
Again since there is a controller that will be responsible for taking this "user provided CA configmap" and converting it into the "/etc/pki merged configmap" that pods actually consume, that controller can validate the CA/proxy config before it update the "/etc/pki merged configmap" that lives in openshift-config-managed.
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 like having a configmap reference. ConfigMaps are easy for cluster admins to build and manage. We use references heavily in the rest of our cluster config resources. Giving flexibility to a cluster-admin to choose locations and specificity for post-processing is a pattern that has worked effectively for other cluster-admin inputs so far.