Files
helm-mailman3/mailman3/templates/ingress.yaml
2020-09-25 12:41:26 +02:00

34 lines
878 B
YAML

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "mailman3.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "mailman3.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.hostname }}
secretName: {{ include "mailman3.fullname" . }}-certificate
{{- end }}
rules:
- host: {{ .Values.hostname | quote }}
http:
paths:
- path: /
backend:
serviceName: {{ include "mailman3.fullname" . }}-web
servicePort: 80
{{- end }}