diff --git a/charts/intel/templates/deployment.yaml b/charts/intel/templates/deployment.yaml index 34080da..07e6a70 100644 --- a/charts/intel/templates/deployment.yaml +++ b/charts/intel/templates/deployment.yaml @@ -27,6 +27,12 @@ spec: - name: {{ include "codetogether.fullname" . }}-pull-secret {{- end }} serviceAccountName: {{ include "codetogether.serviceAccountName" . }} + + {{- with .Values.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/intel/values.yaml b/charts/intel/values.yaml index bb4c418..717a055 100644 --- a/charts/intel/values.yaml +++ b/charts/intel/values.yaml @@ -133,6 +133,19 @@ serviceAccount: podAnnotations: {} +# Optional: add initContainers (startup containers) to the pod spec. +# Useful to wait for Cassandra or run startup checks before Intel starts. +initContainers: [] +# Example: +# initContainers: +# - name: wait-for-cassandra +# image: busybox:1.36 +# command: ["sh", "-c"] +# args: +# - > +# until nc -z codetogether-cassandra.default.svc.cluster.local 9042; +# do echo "Waiting for Cassandra..."; sleep 2; done + securityContext: {} #defaults # capabilities: # drop: