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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
The changes proposed in this pull request are to enable
initContainers
to be specified by the deployer by adding the container's key, and then all the properties required for theinitContainer
(see below for further details).Additional volumes for this pod can be defined by adding the
extraVolumes
key and then entering the details of the volume/s requiredVolumes can be mounted on the cp-ksql-server container by specifying the
extraVolumeMounts
key and entering the volume mount details(Please fill in changes proposed in this fix)
The following setup can be added to Values file and provides support for udf functions to be applied at pod initialisation time. The below example simply creates an empty file, but the ksqldb jar file can either be downloaded via curl, or else packaged inside a docker container, that can be used as the initialisation image to then transfer the jar files to the empty directly volume that is created in extraVolumes and mounted by extraVolumeMounts so that ksqldb can then access it.
How was this patch tested?
(Please explain how this patch was tested. E.g. helm upgrade on minikube, helm install on gke)
This functionality has been tested on a k3d kubernetes cluster that was previously running ksqldb-server (version 0.26.0). I have applied the configurations shown above to create an emptyDir volume mounted on both an initContainer and the cp-ksql-server container. The initcontainer simply creates an empty file on the volume mount.
When the pod has been initialised and running successfully, I entered the shell using the command
kubectl exec -it <pod name> -- bash
and verified that file/opt/ksqldb-udfs/additional-file
has been created successfully.The configurations have been removed in order to verify that when they are disabled, the application is able to run successfully, thus ensuing that when the configurations are disabled, the chart does not fail.