Skip to content

fix: set kyverno webhook failure policy to ignore (fix uninstall deadlock)#26

Merged
thesuperzapper merged 1 commit into
deployKF:mainfrom
thesuperzapper:kyverno-failure-policy
Sep 21, 2023
Merged

fix: set kyverno webhook failure policy to ignore (fix uninstall deadlock)#26
thesuperzapper merged 1 commit into
deployKF:mainfrom
thesuperzapper:kyverno-failure-policy

Conversation

@thesuperzapper

Copy link
Copy Markdown
Member

related: #24

Currently, Kyverno 1.10 will not clean up its ValidatingWebhookConfigurations and MutatingWebhookConfigurations when uninstalled, which will always result in the cluster being deadlocked. This is because Kyverno's webhooks intercept most Kubernetes API requests for validation, and if Kyverno no longer exists, it will fail.

This PR tells Kyverno to "fail open" on the resource webook, to prevent this issue.

We can revert this change once kyverno/kyverno#8390 is resolved.


Note, that the webhooks will still be left on uninstall with this change, they won't deadlock the cluster.

To remove the webhooks fully, follow Kyverno's guide, and run:

kubectl delete validatingwebhookconfiguration kyverno-resource-validating-webhook-cfg
kubectl delete mutatingwebhookconfiguration kyverno-resource-mutating-webhook-cfg

Also, I have included changes necessary to update to newer versions of Kyvernos's helm chart, but currently, we can't update past Kyverno 1.10.0 as Kyverno broke support for replicating secrets with longer than 63 characters in 1.10.1.

Note, chart 3.0.1 (our current default) includes Kyverno 1.10.0.

@thesuperzapper thesuperzapper added this to the v0.1.2 milestone Sep 21, 2023
@thesuperzapper
thesuperzapper merged commit 783620c into deployKF:main Sep 21, 2023
@thesuperzapper
thesuperzapper deleted the kyverno-failure-policy branch September 21, 2023 19:00
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.

1 participant