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) <rong.zhang@windriver.com>
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:
- 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:
namespace: oran-o2
db:
+ persistence: true
storageSize: 10Gi
# ImagePullSecrets for operator ServiceAccount, list of secrets in the same