From 2e63a34666b3945a3e5c8f62143215bff7810704 Mon Sep 17 00:00:00 2001 From: Jeremy Bopp Date: Mon, 1 Nov 2021 15:09:23 -0500 Subject: [PATCH] Add support for defining additional volumes * This allows use of emptyDir volumes for /tmp when the root filesystme is read-only, for instance --- charts/wave/templates/deployment.yaml | 2 ++ charts/wave/values.yaml | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/charts/wave/templates/deployment.yaml b/charts/wave/templates/deployment.yaml index fef18bc2..e0ef9e27 100644 --- a/charts/wave/templates/deployment.yaml +++ b/charts/wave/templates/deployment.yaml @@ -28,6 +28,8 @@ spec: {{- if .Values.syncPeriod }} - --sync-period={{ .Values.syncPeriod }} {{- end }} + volumeMounts: {{ toYaml .Values.extraVolumeMounts | nindent 12 }} securityContext: {{ toYaml .Values.securityContext | nindent 8 }} serviceAccountName: {{ .Values.serviceAccount.name | default (include "wave-fullname" .) }} nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + volumes: {{ toYaml .Values.extraVolumes | nindent 8 }} diff --git a/charts/wave/values.yaml b/charts/wave/values.yaml index 59b627f4..bb100f64 100644 --- a/charts/wave/values.yaml +++ b/charts/wave/values.yaml @@ -20,6 +20,16 @@ nodeSelector: {} # Replicas > 1 will enable leader election replicas: 1 +# Additional volumes to use in the pod. +extraVolumes: [] +# - name: tmp +# emptyDir: {} + +# Additional volumes to mount into the container. +extraVolumeMounts: [] +# - name: tmp +# mountPath: /tmp + # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: runAsNonRoot: true