Skip to content

Commit

Permalink
feat(alloydbomni): enable webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
byashimov committed Nov 18, 2024
1 parent 564d635 commit 679768f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ resources:
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_alloydbomnis.yaml
- patches/webhook_in_clickhouses.yaml
- patches/webhook_in_connectionpools.yaml
- patches/webhook_in_databases.yaml
Expand All @@ -56,6 +57,7 @@ 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_alloydbomnis.yaml
- patches/cainjection_in_clickhouses.yaml
- patches/cainjection_in_connectionpools.yaml
- patches/cainjection_in_databases.yaml
Expand Down
7 changes: 7 additions & 0 deletions config/crd/patches/cainjection_in_alloydbomnis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The following patch adds a directive for certmanager to inject CA into the CRD
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: alloydbomnis.aiven.io
16 changes: 16 additions & 0 deletions config/crd/patches/webhook_in_alloydbomnis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The following patch enables a conversion webhook for the CRD
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: alloydbomnis.aiven.io
spec:
conversion:
strategy: Webhook
webhook:
clientConfig:
service:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions:
- v1

0 comments on commit 679768f

Please sign in to comment.