Files
wordyne/Chart/templates/ingress.yaml
2023-09-13 13:43:29 +02:00

35 lines
1.1 KiB
YAML

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "..fullname" . }}
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 512M
nginx.ingress.kubernetes.io/client-max-body-size: 512M
labels:
{{- include "..labels" . | nindent 4 }}
spec:
ingressClassName: nginx
{{- if or .Values.site.certificate.certManager .Values.site.certificate.importCert }}
tls:
- secretName: {{ include "..fullname" . }}-cert-secret
hosts: {{ include "..domains" . | nindent 6 }}
{{- else if .Values.site.certificate.existingCert }}
tls:
- secretName: {{ .Values.site.certificate.existingCertName }}
hosts: {{ include "..domains" . | nindent 6 }}
{{- end }}
rules:
{{- range include "..domains" . | split "\n" }}
{{- if ne . "" }}
- host: {{ . | replace "- " ""}}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "..fullname" $ }}
port:
number: 80
{{- end }}
{{- end }}