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
[release-v0.18] fix: Remove namespaceSelector from webhook definition #979
[release-v0.18] fix: Remove namespaceSelector from webhook definition #979
Conversation
The ValidatingWebhookConfiguration created by OLM can have namespaceSelector field set. We don't want that, because the webhook checks that there is only one SSP resource in the cluster. This commit adds a controller that watches ValidatingWebhookConfigurations and removes the namespaceSelector, if the object has a specific label. Cherry-pick fron: 948eeaa Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
Some changes were needed from the PR in main branch. - "slices" package is not yet in go 1.19 - The "TypeMeta" needs to be defined in objects used in unit tests. - Do not use "k8s.io/utils/ptr" package. Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
eb15581
to
52995a8
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Waiting for QE to confirm that we want this. /hold |
QE wants this backport. /unhold |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lyarwood 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 |
This is a backport of: #879
What this PR does / why we need it:
The
ValidatingWebhookConfiguration
created by OLM can havenamespaceSelector
field set. We don't want it, because the webhook checks that there is only one SSP resource in the cluster.Which issue(s) this PR fixes:
Jira: https://issues.redhat.com/browse/CNV-36636
Release note: