Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

feat: adding ksqldb helm chart support for initcontainer, volumes and mounts #615

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions charts/cp-ksql-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ spec:
{{- end }}
{{- end }}
spec:
{{- if hasKey .Values "initContainers" }}
initContainers:
{{- range $key, $value := .Values.initContainers }}
- name: {{ $key }}
{{ toYaml $value | trim | indent 8 }}
{{- end }}
{{- end }}
containers:
{{- if .Values.prometheus.jmx.enabled }}
- name: prometheus-jmx-exporter
Expand Down Expand Up @@ -74,6 +81,9 @@ spec:
- name: ksql-queries
mountPath: /etc/ksql/queries
{{- end }}
{{- if hasKey .Values "extraVolumeMounts" }}
{{ toYaml .Values.extraVolumeMounts | trim | indent 10 }}
{{ end }}
env:
- name: KSQL_BOOTSTRAP_SERVERS
value: {{ template "cp-ksql-server.kafka.bootstrapServers" . }}
Expand Down Expand Up @@ -103,6 +113,9 @@ spec:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
volumes:
{{- if hasKey .Values "extraVolumes" }}
{{ toYaml .Values.extraVolumes | trim | indent 6 }}
{{- end }}
{{- if .Values.prometheus.jmx.enabled }}
- name: jmx-config
configMap:
Expand Down
24 changes: 24 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,30 @@ cp-ksql-server:
ksql:
headless: false

## Optionally add init containers that initialises ksqldb, like adding ksqldb-udfs in a mounted volume
# initContainers:
# init:
# image: busybox:latest
# imagePullPolicy: IfNotPresent
# command:
# - sh
# - -c
# - |
# touch /opt/ksqldb-udfs/additional-file
# volumeMounts:
# - mountPath: /opt/ksqldb-udfs
# name: extensions-volume

## Optionally mounts volumes to the cp-ksql-server container
# extraVolumeMounts:
# - mountPath: /opt/ksqldb-udfs
# name: extensions-volume

## Optionally adds additional volumes to this pod
# extraVolumes:
# - name: extensions-volume
# emptyDir: {}

## ------------------------------------------------------
## Control Center
## ------------------------------------------------------
Expand Down