k8s-pulse/helm-chart/templates/ingress.yaml

46 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2026-07-24 11:17:10 +00:00
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "k8s-pulse.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
2026-07-24 00:15:19 +00:00
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
2026-07-24 11:17:10 +00:00
name: {{ $fullName }}
labels:
{{- include "k8s-pulse.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
2026-07-24 00:15:19 +00:00
annotations:
2026-07-24 11:17:10 +00:00
{{- toYaml . | nindent 4 }}
{{- end }}
2026-07-24 00:15:19 +00:00
spec:
2026-07-24 11:17:10 +00:00
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
2026-07-24 00:15:19 +00:00
rules:
2026-07-24 11:17:10 +00:00
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
2026-07-24 00:15:19 +00:00
http:
2026-07-24 11:17:10 +00:00
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if .pathType }}
pathType: {{ .pathType }}
{{- end }}
2026-07-24 00:15:19 +00:00
backend:
service:
2026-07-24 11:17:10 +00:00
name: {{ $fullName }}
2026-07-24 00:15:19 +00:00
port:
2026-07-24 11:17:10 +00:00
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}