diff --git a/charts/mailu/templates/_services.tpl b/charts/mailu/templates/_services.tpl index 8f5cecdf..e802fb3a 100644 --- a/charts/mailu/templates/_services.tpl +++ b/charts/mailu/templates/_services.tpl @@ -85,7 +85,7 @@ Service fqdn (within cluster) can be retrieved with `mailu.SERVICE.serviceFqdn` {{- if not .Values.externalRedis.host -}} {{- fail "externalRedis.host must be set when externalRedis.enabled is true" -}} {{- else -}} - {{- printf "%s" .Values.externalRedis.host -}} + {{- tpl (printf "%s" .Values.externalRedis.host) $ -}} {{- end -}} {{- else -}} {{- printf "%s.%s.svc.%s" (include "mailu.redis.serviceName" . ) (include "mailu.names.namespace" . ) (include "mailu.clusterDomain" . ) -}} diff --git a/charts/mailu/templates/front/ingress.yaml b/charts/mailu/templates/front/ingress.yaml index 491f8815..98bd56f8 100644 --- a/charts/mailu/templates/front/ingress.yaml +++ b/charts/mailu/templates/front/ingress.yaml @@ -19,6 +19,7 @@ metadata: {{- include "mailu.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: + {{- $servicePort := ternary "http" "https" .Values.ingress.enabled }} {{- if .Values.ingress.ingressClassName }} ingressClassName: {{ .Values.ingress.ingressClassName | quote }} {{- end }} @@ -32,7 +33,7 @@ spec: {{- end }} - path: {{ $.Values.ingress.path }} pathType: {{ $.Values.ingress.pathType }} - backend: {{- include "mailu.ingress.backend" (dict "serviceName" (include "mailu.front.serviceName" $) "servicePort" "https" "context" $) | nindent 14 }} + backend: {{- include "mailu.ingress.backend" (dict "serviceName" (include "mailu.front.serviceName" $) "servicePort" $servicePort "context" $) | nindent 14 }} {{- end }} {{- range .Values.ingress.extraHosts }} - host: {{ .name | quote }} @@ -40,7 +41,7 @@ spec: paths: - path: {{ default "/" .path }} pathType: {{ default "ImplementationSpecific" .pathType }} - backend: {{- include "mailu.ingress.backend" (dict "serviceName" (include "mailu.front.serviceName" $) "servicePort" "https" "context" $) | nindent 14 }} + backend: {{- include "mailu.ingress.backend" (dict "serviceName" (include "mailu.front.serviceName" $) "servicePort" $servicePort "context" $) | nindent 14 }} {{- end }} {{- if .Values.ingress.extraRules }} {{- include "mailu.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}