diff --git a/charts/cass-operator-chart/templates/validatingwebhookconfiguration.yaml b/charts/cass-operator-chart/templates/validatingwebhookconfiguration.yaml index 6c6eab0bd..f12be5319 100644 --- a/charts/cass-operator-chart/templates/validatingwebhookconfiguration.yaml +++ b/charts/cass-operator-chart/templates/validatingwebhookconfiguration.yaml @@ -7,7 +7,7 @@ webhooks: rules: - apiGroups: ["cassandra.datastax.com"] apiVersions: ["v1beta1"] - operations: ["CREATE", "UPDATE", "DELETE"] + operations: ["CREATE", "UPDATE"] resources: ["cassandradatacenters"] scope: "*" clientConfig: diff --git a/docs/user/cass-operator-manifests-pre-1.15.yaml b/docs/user/cass-operator-manifests-pre-1.15.yaml index e9ea8de7c..e5ad09aae 100644 --- a/docs/user/cass-operator-manifests-pre-1.15.yaml +++ b/docs/user/cass-operator-manifests-pre-1.15.yaml @@ -553,7 +553,6 @@ webhooks: operations: - CREATE - UPDATE - - DELETE resources: - cassandradatacenters scope: '*' diff --git a/docs/user/cass-operator-manifests.yaml b/docs/user/cass-operator-manifests.yaml index 2314a7c71..23a333e06 100644 --- a/docs/user/cass-operator-manifests.yaml +++ b/docs/user/cass-operator-manifests.yaml @@ -555,7 +555,6 @@ webhooks: operations: - CREATE - UPDATE - - DELETE resources: - cassandradatacenters scope: '*' diff --git a/operator/pkg/apis/cassandra/v1beta1/webhook.go b/operator/pkg/apis/cassandra/v1beta1/webhook.go index eea9c7e57..0de2f6195 100644 --- a/operator/pkg/apis/cassandra/v1beta1/webhook.go +++ b/operator/pkg/apis/cassandra/v1beta1/webhook.go @@ -115,7 +115,7 @@ func ValidateDatacenterFieldChanges(oldDc CassandraDatacenter, newDc CassandraDa return nil } -// +kubebuilder:webhook:path=/validate-cassandradatacenter,mutating=false,failurePolicy=ignore,groups=cassandra.datastax.com,resources=cassandradatacenters,verbs=create;update;delete,versions=v1beta1,name=validate-cassandradatacenter-webhook +// +kubebuilder:webhook:path=/validate-cassandradatacenter,mutating=false,failurePolicy=ignore,groups=cassandra.datastax.com,resources=cassandradatacenters,verbs=create;update,versions=v1beta1,name=validate-cassandradatacenter-webhook var _ webhook.Validator = &CassandraDatacenter{} func (dc *CassandraDatacenter) ValidateCreate() error {