-
Notifications
You must be signed in to change notification settings - Fork 597
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
eventing-webhook mutates itself when SinkBinding is present #8161
Comments
The test log shows that downgrade fails with:
The test scales the eventing-webhook down to 0 and back to 3. But scaling back to 3 fails. The new tests from the pull request deploy a container source that brings SinkBinding that causes the issue. |
My experiments show that adding the label |
I think we can add this to the webhook configuration and it will be preserved [1]: namespaceSelector:
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- "knative-eventing" [1] https://github.com/knative/pkg/blob/89743d9bbf7cc691f156b945bb29f96989da4e03/webhook/psbinding/psbinding.go#L348-L352 |
In this case, would it be possible to exclude individual objects in other namespaces through objectSelector like in this commit ? By using the example above all the other namespaces would be already included so excluding individual objects would not be possible, IMO. And I guess excluding whole namespace (if the user wants it) would not be possible either. |
exclusion case:
that will only pass when:
given that from https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#mutatingwebhook-v1-admissionregistration-k8s-io
inclusion case:
that will only pass when:
|
When this issue is fixed, the following workaround should be removed as well in test/e2e-common.sh: link |
Describe the bug
Running downgrade from Eventing 1.16 to 1.15 can fail with "no endpoints available for service "eventing-webhook" when ContainerSource (and thus SinkBinding) is present in the cluster.
The upgrade tests scale the eventing-webhook to zero and back to 3. But scaling back to 3 fails with this error:
There's a
MutatingWebhookConfiguration
named sinkbindings.webhook.sources.knative.dev which is run by eventing-webhook itself:As a result, the eventing-webhook is not started again and remains scaled to zero.
It happens on this PR which extends upgrade/downgrade tests in a specific way. Some resources are created before upgrade and verified after upgrade, and some resources are created after upgrade and verified later after downgrade. The tests now include ContainerSource which creates SinkBindings.
Example failure is in this run
However, the eventing-webhook Deployment already has the label
bindings.knative.dev/exclude: "true"
which should exclude it from the webhook selection:Expected behavior
The eventing-webhook is up-and-running after downgrade.
To Reproduce
Having ContainerSource and doing downgrade from 1.16 to 1.15. This PR reproduces the behavior reliably.
Knative release version
Downgrading from pre-release 1.16 to 1.15
Additional context
The text was updated successfully, but these errors were encountered: