-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix helm install without cluster admin priv #369
Merged
Merged
Conversation
This file contains 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
Normally, when installing the operator via a helm chart you need full cluster admin privileges. There is a path that you can take install the operator if you don't have cluster admin priv. That was broken that this PR is fixing. The root cause was that cluster roles/rolebindings were added to the operator so that it could patch the webhook config objects. This is only needed when the operator generates its own cert for the webhook. We are adding conditional logic in those manifests to only apply them if the operator is generating the certs. New e2e testcase was added to verify install without cluster admin priv.
7f35ca3
to
dbe6e1e
Compare
roypaulin
reviewed
Apr 7, 2023
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 have a few questions for now.
tests/e2e-leg-3/non-cluster-admin-deployment/15-run-cluster-admin-tasks.yaml
Show resolved
Hide resolved
tests/e2e-leg-3/non-cluster-admin-deployment/15-run-cluster-admin-tasks.yaml
Show resolved
Hide resolved
I missed a few things in my first commit. We patch the webhook CA bundle for other use cases. Not just when we have the operator generate the self-signed cert. So we need to broaden when the clusterroles and clusterrolebindings are added. The rules to add clusterroles and clusterrolebindings are: - webhook must be enabled - webhook cert source is internal - webhook cert source is a user provided secret
Co-authored-by: Roy Paulin <paulin.nguetsop@yahoo.com>
roypaulin
reviewed
Apr 9, 2023
roypaulin
approved these changes
Apr 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Normally, when installing the operator via a helm chart you need full cluster admin privileges. There is a path that you can take install the operator if you don't have cluster admin priv. That was broken a few months ago. This PR is fixing that.
The root cause was that cluster roles/rolebindings were added to the operator so that it could patch the webhook config objects. This is only needed when the operator generates its own cert for the webhook. We are adding conditional logic in those manifests to only apply them if the operator is generating the certs.
New e2e testcase was added to verify install without cluster admin priv.