Files
bot_Tamiseur/deploy/templates/ingress.yaml
T
Zachary Guénot 8a9b998946 Fix ingress end
2026-03-27 14:17:51 +01:00

49 lines
1.3 KiB
YAML

{{- $ingress := .Values.ingress -}}
{{- if $ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}
{{- with $ingress.annotations }}
annotations:
{{- range $key, $value := . }}
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
{{- end }}
{{- end }}
labels:
{{- range $key, $value := $ingress.labels }}
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
{{- end }}
spec:
{{- if $ingress.ingressClassName }}
ingressClassName: {{ $ingress.ingressClassName }}
{{- end }}
{{- if $ingress.tls }}
tls:
{{- range $ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ tpl . $ | quote }}
{{- end }}
{{- with .secretName }}
secretName: {{ tpl . $ }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range $ingress.rules }}
- host: {{ tpl .host $ | quote }}
http:
paths:
{{- range .paths }}
- path: {{ tpl .path $ | quote }}
pathType: {{ .pathType }}
backend:
service:
name: "{{ .Release.Name }}-{{ .Values.service.name }}"
port:
name: {{ .Values.service.name }}
{{- end }}
{{- end }}
{{- end -}}