streams-manifests/kafdrop/base/charts/kafdrop-4.1.0/templates/ingress.yaml
2024-12-11 15:25:15 +01:00

43 lines
1.3 KiB
YAML

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "chart.fullname" . -}}
{{- $ingress := .Values.ingress -}}
apiVersion: {{ include "ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app.kubernetes.io/name: {{ include "chart.name" . }}
helm.sh/chart: {{ include "chart.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with $ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- with (pick $ingress "ingressClassName" "tls") }}
{{- . | toYaml | nindent 2 }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
{{- if eq "networking.k8s.io/v1" (include "ingress.apiVersion" $) }}
- path: {{ $ingress.path }}
pathType: {{ $ingress.pathType | default "ImplementationSpecific" }}
backend:
service:
name: {{ $fullName }}
port:
name: http
{{- else }}
- {{- with (pick $ingress "path" "pathType") }}
{{- . | toYaml | nindent 12 }}
{{- end }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}
{{- end }}