From 61da96fdc4437c7069e9b7ee94d9f3752c79d4a8 Mon Sep 17 00:00:00 2001 From: Carlo Field Date: Mon, 9 Dec 2024 09:13:16 +0100 Subject: [PATCH] feat(etcd-defrag): support for extra volumes (#1188) --- charts/etcd-defrag/templates/cronjob.yaml | 6 ++++++ charts/etcd-defrag/values.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/charts/etcd-defrag/templates/cronjob.yaml b/charts/etcd-defrag/templates/cronjob.yaml index 95ebcc72..42f0cf11 100644 --- a/charts/etcd-defrag/templates/cronjob.yaml +++ b/charts/etcd-defrag/templates/cronjob.yaml @@ -105,6 +105,9 @@ spec: mountPath: "/tmp/kubernetes/pki/etcd" readOnly: true {{- end }} + {{- if .Values.extraVolumeMounts }} + {{- toYaml .Values.extraVolumeMounts | nindent 16 }} + {{- end }} {{- if .Values.defrag.pod.restartPolicy }} restartPolicy: {{ .Values.defrag.pod.restartPolicy | quote }} {{- end }} @@ -146,4 +149,7 @@ spec: - key: key path: server.key {{- end }} + {{- if .Values.extraVolumes }} + {{- toYaml .Values.extraVolumes | nindent 12 }} + {{- end }} {{- end }} diff --git a/charts/etcd-defrag/values.yaml b/charts/etcd-defrag/values.yaml index f7294a36..760a47a3 100644 --- a/charts/etcd-defrag/values.yaml +++ b/charts/etcd-defrag/values.yaml @@ -66,6 +66,12 @@ affinity: {} # -- additional environment variables to be added to the pods extraEnv: [] +# -- additional volumes to be added to the pods +extraVolumes: [] + +# -- additional volume mounts to be added to the pods +extraVolumeMounts: [] + # -- specify if the CronJob should run on the hostNetwork hostNetwork: false