-
Notifications
You must be signed in to change notification settings - Fork 107
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
Make webhooks' failurePolicy and namespaceSelector configurable #883
Conversation
bb5aae4
to
d6b6d11
Compare
/test pull-security-profiles-operator-test-e2e |
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.
Great, thank you!
/test pull-security-profiles-operator-test-e2e |
hmm, changing the verbosity seems to be flaky lately..not sure if it's related to this PR though... |
/test pull-security-profiles-operator-test-e2e |
oops, I can reproduce the issue locally. Stupid tests, finding issues in my code.. |
/hold |
By default, our webhooks target all namespaces. While from a security standpointm this is OK, because the webhooks react to our CRs and therefore an explicit RBAC rule must be added to manage them, there is still a risk that if there is a bug in the webhooks, the function of critical namespaces might be affected. This patch exposes the failureMode and the namespaceSelector as configurable through a newly added webhookOptions object in the spod CR to enable admins to select which namespaces should be watched by the webhook and what should happen on failure. In addition, namespace runlevels 0 and 1 are ignored by defualt on OCP. Signed-off-by: Jakub Hrozek <jhrozek@redhat.com>
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhrozek, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
By default, our webhooks target all namespaces. While from a security
standpointm this is OK, because the webhooks react to our CRs and
therefore an explicit RBAC rule must be added to manage them, there is
still a risk that if there is a bug in the webhooks, the function of
critical namespaces might be affected.
This patch exposes the failureMode and the namespaceSelector as
configurable through a newly added webhookOptions object in the spod CR
to enable admins to select which namespaces should be watched by the
webhook and what should happen on failure.
In addition, namespace runlevels 0 and 1 are ignored by defualt on OCP.
Which issue(s) this PR fixes:
Fixes #672
Does this PR have test?
Yes, an e2e test was added.
Special notes for your reviewer:
I'll point a question inline.
Does this PR introduce a user-facing change?