From a21912cc8422e7f459261692364ffa15c3e0ebd8 Mon Sep 17 00:00:00 2001 From: mr-onion-2 Date: Sun, 15 Nov 2020 15:42:44 +0000 Subject: [PATCH] [Deconz] - Add option for a persistence.subpath (#160) Co-authored-by: Mike Knell --- charts/deconz/Chart.yaml | 2 +- charts/deconz/README.md | 1 + charts/deconz/templates/statefulset.yaml | 3 +++ charts/deconz/values.yaml | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/deconz/Chart.yaml b/charts/deconz/Chart.yaml index 5ea5da07..615e306a 100644 --- a/charts/deconz/Chart.yaml +++ b/charts/deconz/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: deconz description: A Helm chart for deploying deCONZ -version: 2.0.0 +version: 2.0.1 appVersion: 2.05.80 keywords: - deconz diff --git a/charts/deconz/README.md b/charts/deconz/README.md index 0f7d66ea..d621067a 100644 --- a/charts/deconz/README.md +++ b/charts/deconz/README.md @@ -79,6 +79,7 @@ Read through the [values.yaml](https://github.com/k8s-at-home/charts/blob/master | `persistence.existingClaim` | Use an existing PVC to persist data | `nil` | | `persistence.accessMode` | Persistence access mode | `ReadWriteOnce` | | `persistence.size` | Size of persistent volume claim | `1Gi` | +| `persistence.subPath` | Mount a sub dir of the persistent volume | `nil` | | `extraVolumes` | Optionally add additional Volumes | `[]` | | `resources` | CPU/Memory resource requests/limits | `{}` | | `nodeSelector` | Node labels for pod assignment | `{}` | diff --git a/charts/deconz/templates/statefulset.yaml b/charts/deconz/templates/statefulset.yaml index cac17312..f0dac385 100644 --- a/charts/deconz/templates/statefulset.yaml +++ b/charts/deconz/templates/statefulset.yaml @@ -77,6 +77,9 @@ spec: {{- end }} - name: config mountPath: /root/.local/share/dresden-elektronik/deCONZ + {{- if .Values.persistence.subPath }} + subPath: {{ .Values.persistence.subPath }} + {{- end }} {{- include "deconz.extraVolumeMounts" . | nindent 12 }} {{- if .Values.probes.liveness.enabled }} livenessProbe: diff --git a/charts/deconz/values.yaml b/charts/deconz/values.yaml index 61844006..3a050b5f 100644 --- a/charts/deconz/values.yaml +++ b/charts/deconz/values.yaml @@ -79,6 +79,8 @@ persistence: # existingClaim: deconz-data accessMode: ReadWriteOnce size: 1Gi + ## When mounting the data volume you may specify a subPath + # subPath: /configs/deconz # Any extra volumes to define for the pod # Volumes will be mounted to the folder specified under mountPath