From 09f02a592a54826b77b712c16463d7fe5960dbb3 Mon Sep 17 00:00:00 2001 From: Mike Splain Date: Mon, 20 Jan 2020 21:55:37 -0500 Subject: [PATCH] [stable/home-assistant] - Add extraVolumes/mounts (#20258) * Add extraVoume * Add extraVoumeMount * Version bump Signed-off-by: Mike Splain --- stable/home-assistant/Chart.yaml | 2 +- stable/home-assistant/README.md | 2 ++ stable/home-assistant/templates/deployment.yaml | 5 +++++ stable/home-assistant/values.yaml | 12 ++++++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/stable/home-assistant/Chart.yaml b/stable/home-assistant/Chart.yaml index e55994447f..5afdc487d3 100644 --- a/stable/home-assistant/Chart.yaml +++ b/stable/home-assistant/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 0.103.3 description: Home Assistant name: home-assistant -version: 0.10.0 +version: 0.11.0 keywords: - home-assistant - hass diff --git a/stable/home-assistant/README.md b/stable/home-assistant/README.md index 7798bd6003..9480f59ded 100644 --- a/stable/home-assistant/README.md +++ b/stable/home-assistant/README.md @@ -143,6 +143,8 @@ The following tables lists the configurable parameters of the Home Assistant cha | `tolerations` | Toleration labels for pod assignment or the home-assistant GUI | `[]` | | `affinity` | Affinity settings for pod assignment or the home-assistant GUI | `{}` | | `podAnnotations` | Key-value pairs to add as pod annotations | `{}` | +| `extraVolumes` | Any extra volumes to define for the pod | `{}` | +| `extraVolumeMounts` | Any extra volumes mounts to define for each container of the pod | `{}` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/stable/home-assistant/templates/deployment.yaml b/stable/home-assistant/templates/deployment.yaml index de3078e562..85c3df4a8a 100644 --- a/stable/home-assistant/templates/deployment.yaml +++ b/stable/home-assistant/templates/deployment.yaml @@ -55,6 +55,7 @@ spec: name: config - mountPath: {{ .Values.git.keyPath }} name: git-secret + {{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 8 }}{{ end }} {{- if .Values.usePodSecurityContext }} securityContext: runAsUser: {{ default 0 .Values.runAsUser }} @@ -130,6 +131,7 @@ spec: - mountPath: {{ .Values.git.keyPath }} name: git-secret {{- end }} + {{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 10 }}{{ end }} {{- if .Values.usePodSecurityContext }} securityContext: runAsUser: {{ default 0 .Values.runAsUser }} @@ -199,6 +201,7 @@ spec: - mountPath: {{ .Values.git.keyPath }} name: git-secret {{- end }} + {{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 10 }}{{ end }} {{- if .Values.usePodSecurityContext }} securityContext: runAsUser: {{ default 0 .Values.runAsUser }} @@ -246,6 +249,7 @@ spec: volumeMounts: - mountPath: /config name: config + {{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 10 }}{{ end }} {{- if .Values.usePodSecurityContext }} securityContext: runAsUser: {{ default 0 .Values.runAsUser }} @@ -291,6 +295,7 @@ spec: defaultMode: 256 secretName: {{ .Values.git.secret }} {{ end }} + {{- if .Values.extraVolumes }}{{ toYaml .Values.extraVolumes | trim | nindent 6 }}{{ end }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} diff --git a/stable/home-assistant/values.yaml b/stable/home-assistant/values.yaml index d0ed7e8212..6f2a7871e3 100644 --- a/stable/home-assistant/values.yaml +++ b/stable/home-assistant/values.yaml @@ -270,3 +270,15 @@ tolerations: [] affinity: {} podAnnotations: {} + +# Any extra volumes to define for the pod +extraVolumes: [] + # - name: example-name + # hostPath: + # path: /path/on/host + # type: DirectoryOrCreate + +# Any extra volume mounts to define for the containers +extraVolumeMounts: [] +# - name: example-name +# mountPath: /path/in/container