If the `APPSMITH_MONGODB_URI` is not set, we set it to a constructed
service URL value. This PR adds the same feature to new
`APPSMITH_DB_URL` env variable as well.
⚠️ This will cause conflicts on sync. DO NOT MERGE unless the author is
available.
/test sanity
---------
Co-authored-by: Goutham Pratapa <goutham@appsmith.com>
30 lines
1.2 KiB
YAML
30 lines
1.2 KiB
YAML
{{- $nameSpace := include "appsmith.namespace" . -}}
|
|
{{- $name := include "appsmith.fullname" . -}}
|
|
{{- $mongoUser := .Values.mongodb.auth.rootUser -}}
|
|
{{- $mongoPassword := .Values.mongodb.auth.rootPassword -}}
|
|
{{- $mongoServicename := .Values.mongodb.service.nameOverride -}}
|
|
{{- $releaseName := .Release.Name -}}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "appsmith.fullname" . }}
|
|
namespace: {{ include "appsmith.namespace" . }}
|
|
labels:
|
|
{{- include "appsmith.labels" . | nindent 4 }}
|
|
data:
|
|
{{- if and $.Values.mongodb.enabled (not .Values.applicationConfig.APPSMITH_MONGODB_URI) (not .Values.applicationConfig.APPSMITH_DB_URL) }}
|
|
APPSMITH_DB_URL: |
|
|
mongodb+srv://{{ $mongoUser }}:{{ $mongoPassword }}@{{ $mongoServicename }}.{{ $nameSpace }}.svc.cluster.local/appsmith?retryWrites=true&authSource=admin&ssl=false
|
|
{{- end }}
|
|
|
|
{{- range $key, $value := .Values.applicationConfig }}
|
|
{{- if and (eq "APPSMITH_REDIS_URL" $key) ( not $value) }}
|
|
{{- if $.Values.redis.enabled }}
|
|
{{ $key }}: redis://{{ $releaseName }}-redis-master.{{ $nameSpace }}.svc.cluster.local:6379
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $value }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|