Skip to content

fix(e2e): wait for webhook before testing PVC rejection#412

Merged
jmclong merged 1 commit intomainfrom
dev/jlong/fix-flakes
Mar 19, 2026
Merged

fix(e2e): wait for webhook before testing PVC rejection#412
jmclong merged 1 commit intomainfrom
dev/jlong/fix-flakes

Conversation

@jmclong
Copy link
Contributor

@jmclong jmclong commented Mar 19, 2026

The lvmWebhookRejectTest flakes because the ValidatingWebhookConfiguration (csi-local-enforce-ephemeral) has failurePolicy: Ignore. When the webhook endpoint isn't reachable yet, the API server silently allows the PVC through instead of rejecting it.

Add VerifyWebhookServing() that uses kubectl apply --dry-run=server to confirm the webhook is actually serving before running the rejection test. The dry-run goes through the full admission pipeline without persisting to etcd. This check runs as its own test step after the storageclass is created (the webhook allows PVCs whose storageclass doesn't exist).

The lvmWebhookRejectTest flakes because the ValidatingWebhookConfiguration
(csi-local-enforce-ephemeral) has failurePolicy: Ignore. When the webhook
endpoint isn't reachable yet, the API server silently allows the PVC
through instead of rejecting it.

Add VerifyWebhookServing() that uses kubectl apply --dry-run=server to
confirm the webhook is actually serving before running the rejection test.
The dry-run goes through the full admission pipeline without persisting to
etcd. This check runs as its own test step after the storageclass is
created (the webhook allows PVCs whose storageclass doesn't exist).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jmclong jmclong merged commit c77614d into main Mar 19, 2026
26 checks passed
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