File tree Expand file tree Collapse file tree
charts/countly-migration/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ Bundled mode: construct from sibling countly-mongodb chart DNS.
101101{{- $host := $bs .host | default (printf " %s -mongodb-svc.%s .svc.cluster.local" $prefix ($bs .namespace | default " mongodb" )) -}}
102102{{- $port := $bs .port | default " 27017" -}}
103103{{- $user := $bs .username | default " app" -}}
104- {{- $pass := required " backingServices.mongodb. password is required when mode=bundled " $bs .password -}}
104+ {{- $pass := $bs . password | default " " -}}
105105{{- $db := $bs .database | default " admin" -}}
106106{{- $rs := $bs .replicaSet | default (printf " %s -mongodb" $prefix ) -}}
107107mongodb://{{ $user }}:{{ $pass }}@{{ $host }}:{{ $port }}/{{ $db }}?replicaSet= {{ $rs }}&ssl= false
Original file line number Diff line number Diff line change @@ -16,7 +16,15 @@ type: Opaque
1616data :
1717 {{- $secretName := include "countly-migration.fullname" . }}
1818 {{- $existing := lookup "v1" "Secret" .Release.Namespace $secretName }}
19+ {{- if and (not .Values.backingServices.mongodb.password) (eq (.Values.backingServices.mongodb.mode | default "bundled") "bundled") }}
20+ {{- if and $existing (index $existing.data "MONGO_URI") }}
21+ MONGO_URI : {{ index $existing.data "MONGO_URI" }}
22+ {{- else }}
23+ {{- fail "backingServices.mongodb.password is required on first install when mode=bundled. Set the value or provide secrets.existingSecret." }}
24+ {{- end }}
25+ {{- else }}
1926 MONGO_URI : {{ include "countly-migration.mongoUri" . | b64enc }}
27+ {{- end }}
2028 CLICKHOUSE_URL : {{ include "countly-migration.clickhouseUrl" . | b64enc }}
2129 {{- if .Values.backingServices.clickhouse.password }}
2230 CLICKHOUSE_PASSWORD : {{ .Values.backingServices.clickhouse.password | b64enc }}
You can’t perform that action at this time.
0 commit comments