Skip to content

Commit

Permalink
refactor(clickhouseuser): remove webhook (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
byashimov authored May 28, 2024
1 parent 52c43fe commit 37a45eb
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 142 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ddog-gov.com, us3.datadoghq.com, us5.datadoghq.com]`
~~`[, https]`~~`[https]`
- Add `ServiceIntegration` field `datadog.datadog_pgbouncer_enabled`, type `boolean`: Enable Datadog
PgBouncer Metric Tracking
- Remove `ClickhouseUser` webhook. Doesn't do any validation or mutation

## v0.19.0 - 2024-04-18

Expand Down
4 changes: 0 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ resources:
kind: ClickhouseUser
path: github.com/aiven/aiven-operator/api/v1alpha1
version: v1alpha1
webhooks:
defaulting: true
validation: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
Expand Down
52 changes: 0 additions & 52 deletions api/v1alpha1/clickhouseuser_webhook.go

This file was deleted.

3 changes: 0 additions & 3 deletions api/v1alpha1/setup_webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ func SetupWebhooks(mgr ctrl.Manager) error {
if err := (&Clickhouse{}).SetupWebhookWithManager(mgr); err != nil {
return fmt.Errorf("webhook Clickhouse: %w", err)
}
if err := (&ClickhouseUser{}).SetupWebhookWithManager(mgr); err != nil {
return fmt.Errorf("webhook ClickhouseUser: %w", err)
}
if err := (&MySQL{}).SetupWebhookWithManager(mgr); err != nil {
return fmt.Errorf("webhook MySQL: %w", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,6 @@ webhooks:
resources:
- clickhouses
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: {{ include "aiven-operator.fullname" . }}-webhook-service
namespace: {{ include "aiven-operator.namespace" . }}
path: /mutate-aiven-io-v1alpha1-clickhouseuser
failurePolicy: Fail
name: mclickhouseuser.kb.io
rules:
- apiGroups:
- aiven.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- clickhouseusers
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,6 @@ webhooks:
resources:
- clickhouses
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: {{ include "aiven-operator.fullname" . }}-webhook-service
namespace: {{ include "aiven-operator.namespace" . }}
path: /validate-aiven-io-v1alpha1-clickhouseuser
failurePolicy: Fail
name: vclickhouseuser.kb.io
rules:
- apiGroups:
- aiven.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- clickhouseusers
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
Expand Down
2 changes: 0 additions & 2 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ patchesStrategicMerge:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
- patches/webhook_in_clickhouses.yaml
- patches/webhook_in_clickhouseusers.yaml
- patches/webhook_in_connectionpools.yaml
- patches/webhook_in_databases.yaml
- patches/webhook_in_kafkas.yaml
Expand All @@ -56,7 +55,6 @@ patchesStrategicMerge:
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
# patches here are for enabling the CA injection for each CRD
- patches/cainjection_in_clickhouses.yaml
- patches/cainjection_in_clickhouseusers.yaml
- patches/cainjection_in_connectionpools.yaml
- patches/cainjection_in_databases.yaml
- patches/cainjection_in_kafkas.yaml
Expand Down
40 changes: 0 additions & 40 deletions config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,6 @@ webhooks:
resources:
- clickhouses
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /mutate-aiven-io-v1alpha1-clickhouseuser
failurePolicy: Fail
name: mclickhouseuser.kb.io
rules:
- apiGroups:
- aiven.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- clickhouseusers
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
Expand Down Expand Up @@ -454,26 +434,6 @@ webhooks:
resources:
- clickhouses
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-aiven-io-v1alpha1-clickhouseuser
failurePolicy: Fail
name: vclickhouseuser.kb.io
rules:
- apiGroups:
- aiven.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- clickhouseusers
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/api-reference/opensearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ title: "OpenSearch"
project: my-aiven-project
cloudName: google-europe-west1
plan: startup-4
disk_space: 80gib
disk_space: 80GiB

maintenanceWindowDow: friday
maintenanceWindowTime: 23:00:00
Expand Down

0 comments on commit 37a45eb

Please sign in to comment.