From 66687ac9482f1138a59a23771040deb4fcddd14f Mon Sep 17 00:00:00 2001 From: Adrian Ludwin Date: Mon, 18 Oct 2021 14:29:22 -0400 Subject: [PATCH] Remove webhooks from CRDs and unbreak K8s 1.22 HNC hasn't has CRD conversion webhooks implemented since v0.6, but somehow we still had them in our CRDs. It looks like earlier versions of K8s simply ignored them but 1.22 hits internal errors if the webhooks can't be called, even though no conversion is actually occurring. Tested: can't install HNC successfully on 1.22 without this change; can install successfully with it. Also, before this change, if I edit the CRDs on the server to remove the conversion webhooks, HNC starts working. --- config/crd/kustomization.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 185cece58..dc1722081 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -11,9 +11,9 @@ patchesStrategicMerge: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD # and setting served and storage versions. -- patches/webhook_in_hierarchyconfigurations.yaml -- patches/webhook_in_hncconfigurations.yaml -- patches/webhook_in_subnamespaceanchors.yaml +# - patches/webhook_in_hierarchyconfigurations.yaml +# - patches/webhook_in_hncconfigurations.yaml +# - patches/webhook_in_subnamespaceanchors.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch # [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.