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]>
  • Loading branch information
f41gh7 committed Dec 19, 2024
1 parent 93a961f commit a8b149e
Show file tree
Hide file tree
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
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Up @@ -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.
Expand Down
100 changes: 0 additions & 100 deletions config/crd/overlay/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/webhook/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8b149e

Please sign in to comment.