From: Zhang Rong(Jon) Date: Fri, 7 Jun 2024 03:29:01 +0000 (+0800) Subject: Fix the helm install failed X-Git-Tag: 2.0.4~4 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F12943%2F2;p=pti%2Fo2.git 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) --- 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