PromucFlow_constructor/deploy/helm/templates/configMap.yaml
Goutham Pratapa 5c5fbaa9f0
Fix redis sub chart name in helm chart (#17866)
Currently, the helm chart has a minor bug where the chart name is
hard-coded. This fix addresses the issue
2022-10-28 10:25:17 +05:30

29 lines
1.1 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 -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "appsmith.fullname" . }}
namespace: {{ include "appsmith.namespace" . }}
labels:
{{- include "appsmith.labels" . | nindent 4 }}
data:
{{- range $key, $value := .Values.applicationConfig }}
{{- if and (eq "APPSMITH_MONGODB_URI" $key) ( not $value) }}
{{- if $.Values.mongodb.enabled }}
{{ $key }}: mongodb+srv://{{ $mongoUser }}:{{ $mongoPassword }}@{{ $mongoServicename }}.{{ $nameSpace }}.svc.cluster.local/appsmith?retryWrites=true&authSource=admin&ssl=false
{{- end }}
{{- end }}
{{- if and (eq "APPSMITH_REDIS_URL" $key) ( not $value) }}
{{- if $.Values.redis.enabled }}
{{ $key }}: redis://{{ $name }}-redis-master.{{ $nameSpace }}.svc.cluster.local:6379
{{- end }}
{{- end }}
{{- if $value }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}