ckotzbauer_helm-charts/charts/prometheus-blackbox-exporter/templates/ingress.yaml

31 lines
991 B
YAML

{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "prometheus-blackbox-exporter.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ template "prometheus-blackbox-exporter.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
spec:
rules:
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: /
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}