From a6a5af74fc4a5de7e6c2296984ce2a327e1a6ec3 Mon Sep 17 00:00:00 2001 From: Henrik Gerdes Date: Fri, 13 Sep 2024 18:40:11 +0200 Subject: [PATCH] feat: allow setting extra volumes via helm - fix #743 Signed-off-by: Henrik Gerdes --- chart/templates/daemonset.yaml | 8 ++++++++ chart/templates/deployment.yaml | 8 ++++++++ chart/values.yaml | 16 ++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/chart/templates/daemonset.yaml b/chart/templates/daemonset.yaml index 7dfc0b33..0669380b 100644 --- a/chart/templates/daemonset.yaml +++ b/chart/templates/daemonset.yaml @@ -92,5 +92,13 @@ spec: {{- end }} resources: {{- toYaml $.Values.resources | nindent 12 }} + {{- with .Values.extraVolumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} priorityClassName: system-cluster-critical + {{- with .Values.extraVolumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index ea92a1e6..e5d0d06e 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -100,5 +100,13 @@ spec: {{- end }} resources: {{- toYaml $.Values.resources | nindent 12 }} + {{- with .Values.extraVolumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} priorityClassName: system-cluster-critical + {{- with .Values.extraVolumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index f46ce43c..df8469c2 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -120,3 +120,19 @@ robot: podLabels: {} podAnnotations: {} + +# Mounts the specified volume to the hcloud-cloud-controller-manager container. +extraVolumeMounts: [] +# # Example +# extraVolumeMounts: +# - name: token-volume +# readOnly: true +# mountPath: /var/run/secrets/hcloud + +# Adds extra volumes to the pod. +extraVolumes: [] +# # Example +# extraVolumes: +# - name: token-volume +# secret: +# secretName: hcloud-token