Skip to content

Commit

Permalink
crd: disable non exist conversion webhook
Browse files Browse the repository at this point in the history
Enable it later after actual migration from v1/beta to v1

Related issue:
#1137

Signed-off-by: f41gh7 <[email protected]>
f41gh7 committed Dec 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 93a961f commit a8b149e
Showing 4 changed files with 21 additions and 121 deletions.
20 changes: 10 additions & 10 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -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"
20 changes: 10 additions & 10 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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.
100 changes: 0 additions & 100 deletions config/crd/overlay/crd.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion config/webhook/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a8b149e

Please sign in to comment.