From f5cd102cf6047225dd25cdaa26f798ecb6c145a5 Mon Sep 17 00:00:00 2001 From: "Zhang Rong(Jon)" Date: Fri, 7 Jun 2024 11:29:01 +0800 Subject: [PATCH] Fix the helm install failed The Helm install will fail if the persistent volume is not enabled. This commit addresses this issue. If the persistent database is disabled, Helm will install successfully. Test Plan: 1. Set the persistent database to true, and verify that the persistent volume works correctly. 2. Set the persistent database to false, and verify that Helm installs correctly. Issue-ID: INF-465 Change-Id: I2f3f483ccac5386b8746e259d601fab8385073f7 Signed-off-by: Zhang Rong(Jon) --- charts/templates/persistent_volume.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/templates/persistent_volume.yaml b/charts/templates/persistent_volume.yaml index c39d70a..4f20cd7 100644 --- a/charts/templates/persistent_volume.yaml +++ b/charts/templates/persistent_volume.yaml @@ -13,6 +13,7 @@ # limitations under the License. --- +{{- if .Values.db.persistence }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -25,4 +26,5 @@ spec: requests: storage: {{ .Values.db.storageSize }} storageClassName: general +{{- end }} --- \ No newline at end of file -- 2.16.6