Files
charts/tatort/templates/ingress.yaml
2025-03-07 12:27:11 +01:00

46 lines
1.1 KiB
YAML

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "tatort.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $ingressPathType := .Values.ingress.pathtype -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "tatort.name" . }}
chart: {{ template "tatort.chart" . }}
component: tatort
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
pathType: {{ $ingressPathType }}
backend:
service:
name: {{ $fullName }}
port:
number: 3000
{{- end }}
{{- end }}