I have a Helm Chart for Cassandra, which is running fine, I am able to connect to it and run cqlsh commands.
I want to add a Helm Hook to the chart. I've managed how to do it, however, I cannot execute cqlsh in the container. This is my Kubernetes Job I want to execute in post-install phase.
apiVersion: batch/v1
kind: Job
metadata:
name: my-job
spec:
template:
metadata:
name: hook-job
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-delete-policy": hook-succeeded
spec:
containers:
- name: cqlsh-cmd
image: <cassandra-image>
command: ["bin/sh", "-c", "cqlsh"]
restartPolicy: OnFailure
However, the cqlsh command is not found.
In general it seems odd I have to re-use the same container I have defined in Helm Chart. Am I doing something wrong?