Merge "Update chart to support the deployment without persistent database"
authorJon Zhang <rong.zhang@windriver.com>
Tue, 28 May 2024 01:36:03 +0000 (01:36 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Tue, 28 May 2024 01:36:03 +0000 (01:36 +0000)
charts/templates/deployment.yaml
charts/values.yaml

index 962c1d5..19d7431 100644 (file)
@@ -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:
index 8b6c01f..83629c4 100644 (file)
@@ -43,6 +43,7 @@ global:
   namespace: oran-o2
 
 db:
+  persistence: true
   storageSize: 10Gi
 
 # ImagePullSecrets for operator ServiceAccount, list of secrets in the same