From d7d9262b895ae72fd2c4af91f591f6a503cbe271 Mon Sep 17 00:00:00 2001 From: git_admin Date: Tue, 28 Apr 2026 07:47:24 +0000 Subject: [PATCH] chart: backend volumeMount + TOWER_OPS_PERSIST_PATH env --- templates/backend-deployment.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/templates/backend-deployment.yaml b/templates/backend-deployment.yaml index 27590cf..fc65960 100644 --- a/templates/backend-deployment.yaml +++ b/templates/backend-deployment.yaml @@ -90,6 +90,15 @@ spec: name: {{ .Values.config.existingSecret }} key: VAULT_TOKEN optional: true + # OpStore persistence — when the PVC is mounted, point + # the backend at a JSON file inside it. With this set, the + # bell + Activity history survive Tower-backend rollouts. + # When persistence is disabled, this stays empty and the + # store runs purely in-memory. + {{- if .Values.backend.persistence.enabled }} + - name: TOWER_OPS_PERSIST_PATH + value: /var/lib/tower/operations.json + {{- end }} readinessProbe: httpGet: path: /healthz @@ -104,4 +113,15 @@ spec: periodSeconds: 15 resources: {{- toYaml .Values.backend.resources | nindent 12 }} + {{- if .Values.backend.persistence.enabled }} + volumeMounts: + - name: tower-data + mountPath: /var/lib/tower + {{- end }} + {{- if .Values.backend.persistence.enabled }} + volumes: + - name: tower-data + persistentVolumeClaim: + claimName: tower-data + {{- end }} {{- end }}