File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11{{- $nameSpace := include "lowcoder.namespace" . -}}
22{{- $mongoUser := (and .Values.mongodb.auth.usernames (first .Values.mongodb.auth.usernames)) | default "" -}}
33{{- $mongoPassword := (and .Values.mongodb.auth.passwords (first .Values.mongodb.auth.passwords)) | default "" -}}
4+ {{- $mongoProtocol := ternary "mongodb+srv" "mongodb" .Values.mongodb.useSrv -}}
5+ {{- $mongoSSL := ternary "true" "false" .Values.mongodb.useSSL -}}
46{{- $lowcoderDatabase := first .Values.mongodb.auth.databases -}}
57{{- $mongoSecret := lookup "v1" "Secret" $nameSpace .Values.mongodb.auth.existingSecret | default dict -}}
68{{- $mongoSecretPassword := (index ($mongoSecret.data | default dict) "password" | default "" | b64dec) -}}
@@ -20,9 +22,9 @@ metadata:
2022 {{- end }}
2123stringData :
2224 {{- if .Values.mongodb.enabled }}
23- LOWCODER_MONGODB_URL : " mongodb ://{{ $mongoUser }}:{{ $mongoPassword }}@{{ $mongoServicename }}.{{ $nameSpace }}.svc.cluster.local/{{ $lowcoderDatabase }}?retryWrites=true&ssl=false"
25+ LOWCODER_MONGODB_URL : " {{ $mongoProtocol }} ://{{ $mongoUser }}:{{ $mongoPassword }}@{{ $mongoServicename }}.{{ $nameSpace }}.svc.cluster.local/{{ $lowcoderDatabase }}?retryWrites=true&ssl=false"
2426 {{- else }}
25- LOWCODER_MONGODB_URL : " mongodb ://{{ $mongoUser }}:{{ $mongoSecretPassword }}@{{ $externalUrl }}/{{ $lowcoderDatabase }}?retryWrites=true&ssl=false "
27+ LOWCODER_MONGODB_URL : " {{ $mongoProtocol }} ://{{ $mongoUser }}:{{ $mongoSecretPassword }}@{{ $externalUrl }}/{{ $lowcoderDatabase }}?retryWrites=true&ssl={{ $mongoSSL }} "
2628 {{- end }}
2729 LOWCODER_DB_ENCRYPTION_PASSWORD : {{ .Values.global.config.encryption.password | default "lowcoder.org" | quote }}
2830 LOWCODER_DB_ENCRYPTION_SALT : {{ .Values.global.config.encryption.salt | default "lowcoder.org" | quote }}
Original file line number Diff line number Diff line change @@ -63,10 +63,14 @@ redis:
6363# Find out more about configuration options at: https://github.com/bitnami/charts/tree/main/bitnami/mongodb/#parameters
6464#
6565mongodb :
66- # externalUrl:
6766 enabled : true
6867 service :
6968 nameOverride : lowcoder-mongodb
69+ # externalUrl:
70+ # if set to true, will use mongodb+srv:// as a prefix in mongo connection string
71+ useSrv : false
72+ # if set to true, will use SSL in mongo connection string; Only considered if using external mongodb
73+ useSSL : false
7074 auth :
7175 rootUser : root
7276 rootPassword : secret
You can’t perform that action at this time.
0 commit comments