-
Notifications
You must be signed in to change notification settings - Fork 62
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
Use unprivileged client (bound to the controllers role) when wiring webhooks/controllers in integration tests #2660
Labels
Comments
danail-branekov
assigned danail-branekov and georgethebeatle and unassigned danail-branekov
Jul 5, 2023
gcapizzi
assigned danail-branekov and kieron-dev and unassigned gcapizzi and georgethebeatle
Jul 11, 2023
kieron-dev
pushed a commit
that referenced
this issue
Jul 11, 2023
This also introduces helpers to create and start the manager, and to create other client with different permissions in testEnvs. Issue: #2660 Co-authored-by: Danail Branekov <[email protected]>
kieron-dev
pushed a commit
that referenced
this issue
Jul 11, 2023
This also introduces helpers to create and start the manager, and to create other client with different permissions in testEnvs. Issue: #2660 Co-authored-by: Danail Branekov <[email protected]>
kieron-dev
pushed a commit
that referenced
this issue
Jul 11, 2023
This also introduces helpers to create and start the manager, and to create other client with different permissions in testEnvs. Issue: #2660 Co-authored-by: Danail Branekov <[email protected]>
danail-branekov
added a commit
that referenced
this issue
Jul 12, 2023
This also introduces helpers to create and start the manager, and to create other client with different permissions in testEnvs. Issue: #2660 Co-authored-by: Danail Branekov <[email protected]>
danail-branekov
added a commit
that referenced
this issue
Jul 12, 2023
This also introduces helpers to create and start the manager, and to create other client with different permissions in testEnvs. Issue: #2660 Co-authored-by: Danail Branekov <[email protected]>
danail-branekov
added a commit
that referenced
this issue
Jul 13, 2023
This also introduces helpers to create and start the manager, and to create other client with different permissions in testEnvs. Issue: #2660 Co-authored-by: Danail Branekov <[email protected]>
danail-branekov
added a commit
that referenced
this issue
Jul 13, 2023
This also introduces helpers to create and start the manager, and to create other client with different permissions in testEnvs. Issue: #2660 Co-authored-by: Danail Branekov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently we are wiring webhooks/controllers in integration tests to use a k8s client created out of the default env test config. That config describes a user that is part of the cluster admin groups, therefore controllers in the env test run as admin user. This is however not the case on productive deployments - there controllers/webhooks are run as part of the controller deployment as the controllers manager service account which is bound to the controller manager role.
This difference hides potential bugs with permissions misconfiguration. In order to address that, we need to wire controllers and webhooks in all integration test suites with clients with controller manager permissions. We have already done that here, we need to spread the pattern in all envtests.
The text was updated successfully, but these errors were encountered: