1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-20 04:23:16 +00:00
Files
xslt-lab/charts/xslt-playground/templates/backend-ingress.yaml
T
2025-07-04 11:32:32 +02:00

45 lines
1.2 KiB
YAML

{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "xslt-playground.fullname" . }}-backend
{{- with .Values.ingress.className }}
annotations:
kubernetes.io/ingress.class: {{ . | quote }}
{{- end }}
{{- range $k, $v := .Values.ingress.annotations }}
{{ $k }}: {{ $v | quote }}
{{- end }}
labels:
{{- include "xslt-playground.labels" $ | nindent 4 }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ printf "backend.%s" .host }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ include "xslt-playground.fullname" $ }}-backend
port:
number: {{ $.Values.service.backend.port }}
{{- end }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ printf "backend.%s" . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- end }}