Skip to content

Commit

Permalink
Helm chart: add extraInitContainers value (#9773)
Browse files Browse the repository at this point in the history
  • Loading branch information
goober authored Oct 17, 2024
1 parent fd0ed8e commit ea3f5c6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm/nessie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ ct install --charts ./helm/nessie --namespace nessie-ns --debug
| dynamodb.secret.awsSecretAccessKey | string | `"aws_secret_access_key"` | The secret key storing the AWS secret access key. |
| dynamodb.secret.name | string | `"awscreds"` | The secret name to pull AWS credentials from. Optional; if not present, the default AWS credentials provider chain is used. |
| extraEnv | list | `[]` | Advanced configuration via Environment Variables. Extra environment variables to add to the Nessie server container. You can pass here any valid EnvVar object: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#envvar-v1-core This can be useful to get configuration values from Kubernetes secrets or config maps. |
| extraInitContainers | list | `[]` | Add additional init containers to the nessie pod(s) See https://kubernetes.io/docs/concepts/workloads/pods/init-containers/. |
| extraServices | list | `[]` | Additional service definitions. All service definitions always select all Nessie pods. Use this if you need to expose specific ports with different configurations. |
| extraVolumeMounts | list | `[]` | Extra volume mounts to add to the nessie container. See https://kubernetes.io/docs/concepts/storage/volumes/. |
| extraVolumes | list | `[]` | Extra volumes to add to the nessie pod. See https://kubernetes.io/docs/concepts/storage/volumes/. |
Expand Down
6 changes: 6 additions & 0 deletions helm/nessie/ci/inmemory-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,9 @@ readinessProbe:
periodSeconds: 5
successThreshold: 1
failureThreshold: 3

extraInitContainers:
- name: hello-world
image: bash
imagePullPolicy: Always
command: ['sh', '-c', 'echo "hello world"']
4 changes: 4 additions & 0 deletions helm/nessie/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ spec:
serviceAccountName: {{ include "nessie.serviceAccountName" . }}
securityContext:
{{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
{{- if .Values.extraInitContainers }}
initContainers:
{{- tpl (toYaml .Values.extraInitContainers) . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
7 changes: 7 additions & 0 deletions helm/nessie/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -933,3 +933,10 @@ extraVolumes: []
extraVolumeMounts: []
# - name: extra-volume
# mountPath: /usr/share/extra-volume

# -- Add additional init containers to the nessie pod(s) See https://kubernetes.io/docs/concepts/workloads/pods/init-containers/.
extraInitContainers: []
# - name: your-image-name
# image: your-image
# imagePullPolicy: Always
# command: ['sh', '-c', 'echo "hello world"']

0 comments on commit ea3f5c6

Please sign in to comment.