Skip to content

Commit

Permalink
Add kafka webhook yaml to the chart
Browse files Browse the repository at this point in the history
Signed-off-by: obaydullahmhs <[email protected]>
  • Loading branch information
obaydullahmhs committed Jan 16, 2024
1 parent 119a3e4 commit c155e91
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 9 deletions.
6 changes: 3 additions & 3 deletions charts/kubedb-crd-manager/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Docker registry fqdn used to pull app related images.
# Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image}
registryFQDN: ""
registryFQDN: ghcr.io

# Docker registry containing app images
image:
# Docker registry used to pull app container image
registry: raihankhanraka
registry: kubedb
# App container image
repository: kubedb-crd-manager
# Overrides the image tag whose default is the chart appVersion.
tag: "1.0"
tag: ""

# Specify an array of imagePullSecrets.
# Secrets must be manually created in the namespace.
Expand Down
6 changes: 3 additions & 3 deletions charts/kubedb-provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ license: ""
licenseSecretName: ""
# Docker registry fqdn used to pull KubeDB related images
# Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image}
registryFQDN: ""
registryFQDN: ghcr.io
# Specify an array of insecure registries.
#
# Example:
Expand All @@ -33,11 +33,11 @@ insecureRegistries: []
# Docker registry containing KubeDB images
operator:
# Docker registry used to pull KubeDB operator image
registry: raihankhanraka
registry: kubedb
# KubeDB operator container image
repository: kubedb-provisioner
# KubeDB operator container image tag
tag: "1.0"
tag: ""
# Security options this container should run with
securityContext: # +doc-gen:break
allowPrivilegeEscalation: false
Expand Down
34 changes: 34 additions & 0 deletions charts/kubedb-webhook-server/templates/apiregistration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,40 @@ spec:
caBundle: {{ $caCrt }}
groupPriorityMinimum: {{ .Values.apiserver.groupPriorityMinimum }}
versionPriority: {{ .Values.apiserver.versionPriority }}
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1alpha1.validators.kafka.kubedb.com
labels:
app.kubernetes.io/component: kubedb-provisioner
{{- include "kubedb-webhook-server.labels" . | nindent 4 }}
spec:
group: validators.kafka.kubedb.com
version: v1alpha1
service:
namespace: {{ .Release.Namespace }}
name: {{ include "kubedb-webhook-server.fullname" . }}
caBundle: {{ $caCrt }}
groupPriorityMinimum: {{ .Values.apiserver.groupPriorityMinimum }}
versionPriority: {{ .Values.apiserver.versionPriority }}
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1alpha1.mutators.kafka.kubedb.com
labels:
app.kubernetes.io/component: kubedb-provisioner
{{- include "kubedb-webhook-server.labels" . | nindent 4 }}
spec:
group: mutators.kafka.kubedb.com
version: v1alpha1
service:
namespace: {{ .Release.Namespace }}
name: {{ include "kubedb-webhook-server.fullname" . }}
caBundle: {{ $caCrt }}
groupPriorityMinimum: {{ .Values.apiserver.groupPriorityMinimum }}
versionPriority: {{ .Values.apiserver.versionPriority }}
{{- end }}
{{- if list "kubedb-webhook-server" "kubedb-ops-manager" | has .Values.server.repository }}
---
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb-webhook-server/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ rules:
- dashboard.kubedb.com
- schema.kubedb.com
- archiver.kubedb.com
- kafka.kubedb.com
resources:
- "*"
verbs: ["get", "list", "watch"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,21 @@ webhooks:
admissionReviewVersions: [ "v1beta1" ]
failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }}
sideEffects: None
- name: connectclusterwebhook.mutators.kafka.kubedb.com
clientConfig:
service:
namespace: default
name: kubernetes
path: /apis/mutators.kafka.kubedb.com/v1alpha1/connectclusterwebhooks
caBundle: {{ $caCrt }}
rules:
- apiGroups: [ "kafka.kubedb.com" ]
apiVersions: [ "*" ]
resources: [ "connectclusters" ]
operations: [ "CREATE", "UPDATE" ]
admissionReviewVersions: [ "v1beta1" ]
failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }}
sideEffects: None
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,21 @@ webhooks:
admissionReviewVersions: ["v1beta1"]
failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }}
sideEffects: None
- name: connectclusterwebhook.validators.kafka.kubedb.com
clientConfig:
service:
namespace: default
name: kubernetes
path: /apis/validators.kafka.kubedb.com/v1alpha1/connectclusterwebhooks
caBundle: {{ $caCrt }}
rules:
- apiGroups: ["kafka.kubedb.com"]
apiVersions: ["*"]
resources: ["connectclusters"]
operations: ["CREATE", "UPDATE", "DELETE"]
admissionReviewVersions: ["v1beta1"]
failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }}
sideEffects: None
{{- end }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/kubedb-webhook-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ license: ""
licenseSecretName: ""
# Docker registry fqdn used to pull KubeDB related images
# Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image}
registryFQDN: ""
registryFQDN: ghcr.io
# Docker registry containing KubeDB images
server:
# Docker registry used to pull KubeDB webhook server image
registry: raihankhanraka
registry: kubedb
# KubeDB webhook server container image
repository: kubedb-webhook-server
# KubeDB webhook server container image tag
tag: "1.0"
tag: ""
# Security options this container should run with
securityContext: # +doc-gen:break
allowPrivilegeEscalation: false
Expand Down

0 comments on commit c155e91

Please sign in to comment.