From cc5ecd25ce17c96be4b5a91c5aab8f43a51a646d Mon Sep 17 00:00:00 2001 From: sHa Date: Mon, 24 Aug 2026 02:44:30 +0300 Subject: [PATCH] Switch adguardhome/esphome/signal-gateway/zigbee2mqtt to PVC storage Replaces raw hostPath (/srv/data/) with a local-path PVC per app, so these apps get proper PVC lifecycle semantics and can have a PVC backup CronJob (matching what gitea already has) instead of being unbacked host directories. local-path already lives on the same disk these hostPaths did, so this isn't a storage-tier change. adguardhome specifically: consolidates the previous split work/+conf/ hostPath mounts into a single PVC mounted at /opt/adguardhome (its own default convention), since a real deployment can't run two hostPath subtrees off one PVC. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01566weDFku8TaRC2CJUPVM1 --- adguardhome/Chart.yaml | 2 +- adguardhome/templates/deployment.yaml | 17 +++++------------ adguardhome/templates/pvc.yaml | 18 ++++++++++++++++++ adguardhome/values.yaml | 12 +++++++----- esphome/Chart.yaml | 2 +- esphome/templates/deployment.yaml | 5 ++--- esphome/templates/pvc.yaml | 18 ++++++++++++++++++ esphome/values.yaml | 9 +++++++-- signal-gateway/Chart.yaml | 2 +- signal-gateway/templates/deployment.yaml | 5 ++--- signal-gateway/templates/pvc.yaml | 18 ++++++++++++++++++ signal-gateway/values.yaml | 9 +++++++-- zigbee2mqtt/Chart.yaml | 2 +- zigbee2mqtt/templates/deployment.yaml | 5 ++--- zigbee2mqtt/templates/pvc.yaml | 18 ++++++++++++++++++ zigbee2mqtt/values.yaml | 9 +++++++-- 16 files changed, 115 insertions(+), 36 deletions(-) create mode 100644 adguardhome/templates/pvc.yaml create mode 100644 esphome/templates/pvc.yaml create mode 100644 signal-gateway/templates/pvc.yaml create mode 100644 zigbee2mqtt/templates/pvc.yaml diff --git a/adguardhome/Chart.yaml b/adguardhome/Chart.yaml index 20eba29..6670d3e 100644 --- a/adguardhome/Chart.yaml +++ b/adguardhome/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: adguardhome description: AdGuard Home DNS server Helm chart type: application -version: 0.1.6 +version: 0.1.7 appVersion: "0.107.79" annotations: version-source: github-release:AdguardTeam/AdGuardHome diff --git a/adguardhome/templates/deployment.yaml b/adguardhome/templates/deployment.yaml index 4902a38..b9931b0 100644 --- a/adguardhome/templates/deployment.yaml +++ b/adguardhome/templates/deployment.yaml @@ -46,16 +46,9 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - - name: work - mountPath: /opt/adguardhome/work - - name: conf - mountPath: /opt/adguardhome/conf + - name: data + mountPath: /opt/adguardhome volumes: - - name: work - hostPath: - path: {{ .Values.volumes.work.hostPath }} - type: DirectoryOrCreate - - name: conf - hostPath: - path: {{ .Values.volumes.conf.hostPath }} - type: DirectoryOrCreate + - name: data + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" .Release.Name) }} diff --git a/adguardhome/templates/pvc.yaml b/adguardhome/templates/pvc.yaml new file mode 100644 index 0000000..c50ea39 --- /dev/null +++ b/adguardhome/templates/pvc.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-data + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + accessModes: + {{- toYaml .Values.persistence.accessModes | nindent 4 }} + {{- with .Values.persistence.storageClass }} + storageClassName: {{ . }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- end }} diff --git a/adguardhome/values.yaml b/adguardhome/values.yaml index 9d86a6a..1610777 100644 --- a/adguardhome/values.yaml +++ b/adguardhome/values.yaml @@ -13,11 +13,13 @@ resources: cpu: "2" memory: "1Gi" -volumes: - work: - hostPath: "" - conf: - hostPath: "" +persistence: + enabled: true + existingClaim: "" + storageClass: local-path + accessModes: + - ReadWriteOnce + size: 1Gi dns: enabled: true diff --git a/esphome/Chart.yaml b/esphome/Chart.yaml index 79ca172..d3e3dec 100644 --- a/esphome/Chart.yaml +++ b/esphome/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: esphome description: ESPHome Helm chart type: application -version: 0.1.26 +version: 0.1.27 appVersion: "2026.8.0" annotations: version-source: github-release:esphome/esphome diff --git a/esphome/templates/deployment.yaml b/esphome/templates/deployment.yaml index ae93ff0..25805d9 100644 --- a/esphome/templates/deployment.yaml +++ b/esphome/templates/deployment.yaml @@ -47,6 +47,5 @@ spec: mountPath: /config volumes: - name: config - hostPath: - path: {{ .Values.volume.hostPath }} - type: DirectoryOrCreate + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" .Release.Name) }} diff --git a/esphome/templates/pvc.yaml b/esphome/templates/pvc.yaml new file mode 100644 index 0000000..c50ea39 --- /dev/null +++ b/esphome/templates/pvc.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-data + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + accessModes: + {{- toYaml .Values.persistence.accessModes | nindent 4 }} + {{- with .Values.persistence.storageClass }} + storageClassName: {{ . }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- end }} diff --git a/esphome/values.yaml b/esphome/values.yaml index 2024fbd..220f7e9 100644 --- a/esphome/values.yaml +++ b/esphome/values.yaml @@ -16,8 +16,13 @@ resources: hostNetwork: true -volume: - hostPath: "" +persistence: + enabled: true + existingClaim: "" + storageClass: local-path + accessModes: + - ReadWriteOnce + size: 1Gi ingresses: {} # https: diff --git a/signal-gateway/Chart.yaml b/signal-gateway/Chart.yaml index 950654b..8d27c90 100644 --- a/signal-gateway/Chart.yaml +++ b/signal-gateway/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: signal-gateway description: Signal Gateway Helm chart type: application -version: 0.1.2 +version: 0.1.3 appVersion: "0.100" annotations: version-source: github-release:bbernhard/signal-cli-rest-api diff --git a/signal-gateway/templates/deployment.yaml b/signal-gateway/templates/deployment.yaml index 7b7361e..ed58c4f 100644 --- a/signal-gateway/templates/deployment.yaml +++ b/signal-gateway/templates/deployment.yaml @@ -39,6 +39,5 @@ spec: mountPath: /home/.local/share/signal-cli volumes: - name: config - hostPath: - path: {{ .Values.volume.hostPath }} - type: DirectoryOrCreate + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" .Release.Name) }} diff --git a/signal-gateway/templates/pvc.yaml b/signal-gateway/templates/pvc.yaml new file mode 100644 index 0000000..c50ea39 --- /dev/null +++ b/signal-gateway/templates/pvc.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-data + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + accessModes: + {{- toYaml .Values.persistence.accessModes | nindent 4 }} + {{- with .Values.persistence.storageClass }} + storageClassName: {{ . }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- end }} diff --git a/signal-gateway/values.yaml b/signal-gateway/values.yaml index 56a3361..a36daca 100644 --- a/signal-gateway/values.yaml +++ b/signal-gateway/values.yaml @@ -19,8 +19,13 @@ resources: cpu: "1" memory: "512Mi" -volume: - hostPath: "" +persistence: + enabled: true + existingClaim: "" + storageClass: local-path + accessModes: + - ReadWriteOnce + size: 1Gi ingresses: {} # https: diff --git a/zigbee2mqtt/Chart.yaml b/zigbee2mqtt/Chart.yaml index e61f468..b8af4bf 100644 --- a/zigbee2mqtt/Chart.yaml +++ b/zigbee2mqtt/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: zigbee2mqtt description: Zigbee2MQTT Helm chart type: application -version: 0.1.5 +version: 0.1.6 appVersion: "2.13.0" annotations: version-source: github-release:Koenkk/zigbee2mqtt diff --git a/zigbee2mqtt/templates/deployment.yaml b/zigbee2mqtt/templates/deployment.yaml index fad1fab..ca41ba4 100644 --- a/zigbee2mqtt/templates/deployment.yaml +++ b/zigbee2mqtt/templates/deployment.yaml @@ -67,6 +67,5 @@ spec: mountPath: /app/data volumes: - name: data - hostPath: - path: {{ .Values.volume.hostPath }} - type: DirectoryOrCreate + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" .Release.Name) }} diff --git a/zigbee2mqtt/templates/pvc.yaml b/zigbee2mqtt/templates/pvc.yaml new file mode 100644 index 0000000..c50ea39 --- /dev/null +++ b/zigbee2mqtt/templates/pvc.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-data + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} +spec: + accessModes: + {{- toYaml .Values.persistence.accessModes | nindent 4 }} + {{- with .Values.persistence.storageClass }} + storageClassName: {{ . }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- end }} diff --git a/zigbee2mqtt/values.yaml b/zigbee2mqtt/values.yaml index 70430fb..e8148ed 100644 --- a/zigbee2mqtt/values.yaml +++ b/zigbee2mqtt/values.yaml @@ -21,8 +21,13 @@ resources: memory: "1Gi" # Persistent /app/data directory (configuration, device database, coordinator backup) -volume: - hostPath: "" +persistence: + enabled: true + existingClaim: "" + storageClass: local-path + accessModes: + - ReadWriteOnce + size: 1Gi nodeSelector: {} tolerations: []