Skip to content

Commit

Permalink
Update chart to support the deployment without persistent database
Browse files Browse the repository at this point in the history
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) <[email protected]>
  • Loading branch information
jonrzhang committed May 24, 2024
1 parent 874ff78 commit 6be44fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ global:
namespace: oran-o2

db:
persistence: true
storageSize: 10Gi

# ImagePullSecrets for operator ServiceAccount, list of secrets in the same
Expand Down

0 comments on commit 6be44fb

Please sign in to comment.