diff --git a/charts/courselit/Chart.yaml b/charts/courselit/Chart.yaml index 7242a87..4b2b80f 100644 --- a/charts/courselit/Chart.yaml +++ b/charts/courselit/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: courselit description: A Helm chart for deploying CourseLIT Learning Management System on Kubernetes type: application -version: 0.1.6 +version: 0.1.7 appVersion: "latest" keywords: - courselit diff --git a/charts/courselit/templates/app-deployment.yaml b/charts/courselit/templates/app-deployment.yaml index 0d81fa1..cb790ac 100644 --- a/charts/courselit/templates/app-deployment.yaml +++ b/charts/courselit/templates/app-deployment.yaml @@ -74,11 +74,19 @@ spec: key: {{ .Values.app.secrets.recaptchaSecretRef.secretKeyKey }} {{- end }} {{- if .Values.mongodb.enabled }} + {{- if .Values.mongodb.useOperator }} + - name: DB_CONNECTION_STRING + valueFrom: + secretKeyRef: + name: {{ include "courselit.fullname" . }}-mongodb-admin-{{ .Values.mongodb.auth.rootUsername }} + key: connectionString.standard + {{- else }} - name: DB_CONNECTION_STRING valueFrom: secretKeyRef: name: {{ include "courselit.fullname" . }}-mongodb-connection key: connectionString + {{- end }} {{- else }} - name: DB_CONNECTION_STRING value: {{ .Values.mongodb.external.connectionString | quote }}