From c58e5a14f902b2e97c78ebd6c146d756b2db547e Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Thu, 31 Oct 2024 15:01:58 +0100 Subject: [PATCH] Remove v1alpha1 for objects from webhook definition If the v1alpha1 version is not available, the webhook will fail. We will therefore remove it here, and manually add it where required Signed-off-by: Nicolas Bigler --- config/controller/webhooks.yaml | 19 ------------------- pkg/controller/webhooks/object.go | 1 - 2 files changed, 20 deletions(-) diff --git a/config/controller/webhooks.yaml b/config/controller/webhooks.yaml index 9575a59cb5..aafe484657 100644 --- a/config/controller/webhooks.yaml +++ b/config/controller/webhooks.yaml @@ -99,25 +99,6 @@ webhooks: resources: - objects sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: webhook-service - namespace: system - path: /validate-kubernetes-crossplane-io-v1alpha1-object - failurePolicy: Fail - name: objectsv1alpha1.vshn.appcat.vshn.io - rules: - - apiGroups: - - kubernetes.crossplane.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - objects - sideEffects: None - admissionReviewVersions: - v1 clientConfig: diff --git a/pkg/controller/webhooks/object.go b/pkg/controller/webhooks/object.go index 325788b59f..c58fdd47df 100644 --- a/pkg/controller/webhooks/object.go +++ b/pkg/controller/webhooks/object.go @@ -6,7 +6,6 @@ import ( ctrl "sigs.k8s.io/controller-runtime" ) -//+kubebuilder:webhook:verbs=delete,path=/validate-kubernetes-crossplane-io-v1alpha1-object,mutating=false,failurePolicy=fail,groups="kubernetes.crossplane.io",resources=objects,versions=v1alpha1,name=objectsv1alpha1.vshn.appcat.vshn.io,sideEffects=None,admissionReviewVersions=v1 //+kubebuilder:webhook:verbs=delete,path=/validate-kubernetes-crossplane-io-v1alpha2-object,mutating=false,failurePolicy=fail,groups="kubernetes.crossplane.io",resources=objects,versions=v1alpha2,name=objects.vshn.appcat.vshn.io,sideEffects=None,admissionReviewVersions=v1 //+kubebuilder:rbac:groups=syn.tools,resources=compositeredisinstances,verbs=get;list;watch;patch;update