Skip to content

Commit b894677

Browse files
committed
Bugfix: Use http as internal port if ingress is enabled (#541)
1 parent 924cc54 commit b894677

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

charts/mailu/templates/front/ingress.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ metadata:
1919
{{- include "mailu.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
2020
{{- end }}
2121
spec:
22+
{{- $servicePort := ternary "http" "https" .Values.ingress.enabled }}
2223
{{- if .Values.ingress.ingressClassName }}
2324
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
2425
{{- end }}
@@ -32,15 +33,15 @@ spec:
3233
{{- end }}
3334
- path: {{ $.Values.ingress.path }}
3435
pathType: {{ $.Values.ingress.pathType }}
35-
backend: {{- include "mailu.ingress.backend" (dict "serviceName" (include "mailu.front.serviceName" $) "servicePort" "https" "context" $) | nindent 14 }}
36+
backend: {{- include "mailu.ingress.backend" (dict "serviceName" (include "mailu.front.serviceName" $) "servicePort" $servicePort "context" $) | nindent 14 }}
3637
{{- end }}
3738
{{- range .Values.ingress.extraHosts }}
3839
- host: {{ .name | quote }}
3940
http:
4041
paths:
4142
- path: {{ default "/" .path }}
4243
pathType: {{ default "ImplementationSpecific" .pathType }}
43-
backend: {{- include "mailu.ingress.backend" (dict "serviceName" (include "mailu.front.serviceName" $) "servicePort" "https" "context" $) | nindent 14 }}
44+
backend: {{- include "mailu.ingress.backend" (dict "serviceName" (include "mailu.front.serviceName" $) "servicePort" $servicePort "context" $) | nindent 14 }}
4445
{{- end }}
4546
{{- if .Values.ingress.extraRules }}
4647
{{- include "mailu.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}

0 commit comments

Comments
 (0)