Skip to content

Conversation

@openshift-cherrypick-robot
Copy link
Contributor

This is an automated cherry-pick of #3973

/assign cardil

Add namespaceSelector to the MutatingWebhookConfiguration to limit
the webhook's scope to namespaces with the samples.knative.dev/release
label. This prevents the webhook from blocking resource deletions in
other namespaces when the serving-tests namespace is torn down.

The issue occurred during upgrade test cleanup where the Route resource
for deployment-upgrade-failure could not be deleted because the webhook
service was unavailable after namespace cleanup started.

Assisted-by: 🤖 Claude Opus/Sonnet 4.5
Delete webhook resources before namespace deletion to prevent blocking
Route finalizer removal when webhook service is unavailable.

The issue occurs when:
1. Tests complete and cleanup starts
2. 'kubectl delete ns serving-tests' begins namespace deletion
3. Routes have finalizers that need removal
4. Finalizer removal triggers the MutatingWebhookConfiguration
5. Webhook service (in serving-tests) is already being deleted
6. Webhook call times out, blocking namespace deletion

Solution: Delete the webhook resources (including the cluster-scoped
MutatingWebhookConfiguration) before deleting the serving-tests namespace.
This mirrors the installation order and prevents the race condition.
The webhook config directory includes 100-namespace.yaml which deletes
the serving-tests namespace. Adding --ignore-not-found prevents the
error when the namespace is already deleted.
@cardil
Copy link
Member

cardil commented Feb 9, 2026

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm label Feb 9, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 9, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cardil, openshift-cherrypick-robot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [openshift-cherrypick-robot]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 9, 2026

@openshift-cherrypick-robot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/420-kitchensink-e2e db6ae8b link false /test 420-kitchensink-e2e
ci/prow/420-mesh-e2e db6ae8b link false /test 420-mesh-e2e

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@cardil
Copy link
Member

cardil commented Feb 10, 2026

/test 420-kitchensink-e2e
/test 420-mesh-e2e

Infra issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants