From a8b149e583be38e2c2795b0e10aca0018f71fea6 Mon Sep 17 00:00:00 2001 From: f41gh7 Date: Thu, 19 Dec 2024 14:36:49 +0100 Subject: [PATCH] crd: disable non exist conversion webhook Enable it later after actual migration from v1/beta to v1 Related issue: https://github.com/VictoriaMetrics/operator/issues/1137 Signed-off-by: f41gh7 --- PROJECT | 20 +++--- config/crd/kustomization.yaml | 20 +++--- config/crd/overlay/crd.yaml | 100 ---------------------------- config/webhook/kustomizeconfig.yaml | 2 +- 4 files changed, 21 insertions(+), 121 deletions(-) diff --git a/PROJECT b/PROJECT index 2f5990d3..c02724f2 100644 --- a/PROJECT +++ b/PROJECT @@ -19,7 +19,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -32,7 +32,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -45,7 +45,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -58,7 +58,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -80,7 +80,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -102,7 +102,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -115,7 +115,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -155,7 +155,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -168,7 +168,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 - api: @@ -190,7 +190,7 @@ resources: path: github.com/VictoriaMetrics/operator/api/operator/v1beta1 version: v1beta1 webhooks: - conversion: true + conversion: false validation: true webhookVersion: v1 version: "3" diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 8eab532a..30da0d87 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -53,16 +53,16 @@ patches: target: kind: CustomResourceDefinition name: vlogs.operator.victoriametrics.com -- path: patches/webhook_in_operator_vmagents.yaml -- path: patches/webhook_in_operator_vmsingles.yaml -- path: patches/webhook_in_operator_vmalertmanagers.yaml -- path: patches/webhook_in_operator_vmalerts.yaml -- path: patches/webhook_in_operator_vmalertmanagerconfigs.yaml -- path: patches/webhook_in_operator_vmauths.yaml -- path: patches/webhook_in_operator_vmclusters.yaml -- path: patches/webhook_in_operator_vmrules.yaml -- path: patches/webhook_in_operator_vmusers.yaml -- path: patches/webhook_in_operator_vlogs.yaml +# - path: patches/webhook_in_operator_vmagents.yaml +# - path: patches/webhook_in_operator_vmsingles.yaml +# - path: patches/webhook_in_operator_vmalertmanagers.yaml +# - path: patches/webhook_in_operator_vmalerts.yaml +# - path: patches/webhook_in_operator_vmalertmanagerconfigs.yaml +# - path: patches/webhook_in_operator_vmauths.yaml +# - path: patches/webhook_in_operator_vmclusters.yaml +# - path: patches/webhook_in_operator_vmrules.yaml +# - path: patches/webhook_in_operator_vmusers.yaml +# - path: patches/webhook_in_operator_vlogs.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch # [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix. diff --git a/config/crd/overlay/crd.yaml b/config/crd/overlay/crd.yaml index 34d9142a..74927344 100644 --- a/config/crd/overlay/crd.yaml +++ b/config/crd/overlay/crd.yaml @@ -5,16 +5,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vlogs.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: system - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VLogs @@ -1066,16 +1056,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmagents.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: vm - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMAgent @@ -5735,16 +5715,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmalertmanagerconfigs.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: vm - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMAlertmanagerConfig @@ -9722,16 +9692,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmalertmanagers.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: vm - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMAlertmanager @@ -12173,16 +12133,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmalerts.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: vm - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMAlert @@ -14121,16 +14071,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmauths.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: system - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMAuth @@ -15780,16 +15720,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmclusters.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: vm - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMCluster @@ -23401,16 +23331,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmrules.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: vm - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMRule @@ -28894,16 +28814,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmsingles.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: vm - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMSingle @@ -31747,16 +31657,6 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: vmusers.operator.victoriametrics.com spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook-service - namespace: vm - path: /convert - conversionReviewVersions: - - v1 group: operator.victoriametrics.com names: kind: VMUser diff --git a/config/webhook/kustomizeconfig.yaml b/config/webhook/kustomizeconfig.yaml index ca73ada1..6b869809 100644 --- a/config/webhook/kustomizeconfig.yaml +++ b/config/webhook/kustomizeconfig.yaml @@ -14,7 +14,7 @@ namespace: - kind: MutatingWebhookConfiguration group: admissionregistration.k8s.io path: webhooks/clientConfig/service/namespace - create: true + create: false - kind: ValidatingWebhookConfiguration group: admissionregistration.k8s.io path: webhooks/clientConfig/service/namespace