From: Zhang Rong(Jon) Date: Fri, 10 May 2024 06:36:40 +0000 (+0800) Subject: Update chart to support the deployment without persistent database X-Git-Tag: 2.0.4~6^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F12897%2F5;p=pti%2Fo2.git Update chart to support the deployment without persistent database In case the O-Cloud may not have the persistent volume, this commit will continue with the deployment and servicing without persistent database which requires the persistent volume configuration in O-Cloud. Test Plan: 1. Tested the application with persistence database, it was as expected. 2. Tested the application without persistence database, it was as expected. Issue-ID: INF-464 Change-Id: I72c6e3cc1538d2f442e1decc3da1123d2106d0b6 Signed-off-by: Zhang Rong(Jon) --- diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml index 962c1d5..19d7431 100644 --- a/charts/templates/deployment.yaml +++ b/charts/templates/deployment.yaml @@ -64,8 +64,10 @@ spec: volumeMounts: - name: scripts mountPath: /opt + {{- if .Values.db.persistence }} - name: db-pv mountPath: /var/lib/postgresql/data + {{- end }} - name: redis image: "{{ .Values.o2ims.images.tags.redis }}" ports: @@ -230,9 +232,11 @@ spec: - configMap: name: {{ .Chart.Name }}-smocacrt name: smocacrt + {{- if .Values.db.persistence }} - name: db-pv persistentVolumeClaim: claimName: {{ .Chart.Name }}-db-pv + {{- end }} {{- if default false .Values.o2ims.useHostCert }} - name: ca-certs hostPath: diff --git a/charts/values.yaml b/charts/values.yaml index 8b6c01f..83629c4 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -43,6 +43,7 @@ global: namespace: oran-o2 db: + persistence: true storageSize: 10Gi # ImagePullSecrets for operator ServiceAccount, list of secrets in the same