From 2cff4fe12608c81cede1042db37ca9ffd1967494 Mon Sep 17 00:00:00 2001 From: Raihan Khan Date: Tue, 23 Jan 2024 12:30:53 +0600 Subject: [PATCH] Add Rabbitmq webhook (#821) Signed-off-by: raihankhan --- .../templates/provisioner/mutating-webhook.yaml | 17 +++++++++++++++++ .../provisioner/validating-webhook.yaml | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/charts/kubedb-webhook-server/templates/provisioner/mutating-webhook.yaml b/charts/kubedb-webhook-server/templates/provisioner/mutating-webhook.yaml index 1f4e43fe6..143a6e8b8 100644 --- a/charts/kubedb-webhook-server/templates/provisioner/mutating-webhook.yaml +++ b/charts/kubedb-webhook-server/templates/provisioner/mutating-webhook.yaml @@ -335,6 +335,23 @@ webhooks: failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }} sideEffects: None {{- end }} +{{- if $featureGates.RabbitMQ }} +- name: rabbitmqwebhook.mutators.kubedb.com + clientConfig: + service: + namespace: default + name: kubernetes + path: /apis/mutators.kubedb.com/v1alpha1/rabbitmqwebhooks + caBundle: {{ $caCrt }} + rules: + - apiGroups: [ "kubedb.com" ] + apiVersions: [ "*" ] + resources: [ "rabbitmqs" ] + operations: [ "CREATE", "UPDATE" ] + admissionReviewVersions: [ "v1beta1" ] + failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }} + sideEffects: None +{{- end }} {{- if $featureGates.Pgpool }} - name: pgpoolwebhook.mutators.kubedb.com clientConfig: diff --git a/charts/kubedb-webhook-server/templates/provisioner/validating-webhook.yaml b/charts/kubedb-webhook-server/templates/provisioner/validating-webhook.yaml index a7f9ac95a..e88c67bf0 100644 --- a/charts/kubedb-webhook-server/templates/provisioner/validating-webhook.yaml +++ b/charts/kubedb-webhook-server/templates/provisioner/validating-webhook.yaml @@ -267,6 +267,23 @@ webhooks: failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }} sideEffects: None {{- end }} +{{- if $featureGates.RabbitMQ }} +- name: rabbitmqwebhook.validators.kubedb.com + clientConfig: + service: + namespace: default + name: kubernetes + path: /apis/validators.kubedb.com/v1alpha1/rabbitmqwebhooks + caBundle: {{ $caCrt }} + rules: + - apiGroups: ["kubedb.com"] + apiVersions: ["*"] + resources: ["rabbitmqs"] + operations: ["CREATE", "UPDATE", "DELETE"] + admissionReviewVersions: ["v1beta1"] + failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }} + sideEffects: None +{{- end }} {{- if $featureGates.Druid }} - name: druidwebhook.validators.kubedb.com clientConfig: