45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
{{- if and .Values.services.http.enabled .Values.ingress.enabled }}
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
{{- with (include "prometheus-postgres-exporter.ingress.annotations" . | fromYaml) }}
|
|
annotations:
|
|
{{- tpl (. | toYaml) $ | nindent 4 }}
|
|
{{- end }}
|
|
{{- with (include "prometheus-postgres-exporter.ingress.labels" . | fromYaml) }}
|
|
labels:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
name: {{ include "prometheus-postgres-exporter.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
ingressClassName: {{ .Values.ingress.className }}
|
|
rules:
|
|
{{- range .Values.ingress.hosts }}
|
|
- host: {{ tpl .host $ | quote }}
|
|
http:
|
|
paths:
|
|
{{- range .paths }}
|
|
- path: {{ .path }}
|
|
{{- if .pathType }}
|
|
pathType: {{ .pathType }}
|
|
{{- end }}
|
|
backend:
|
|
service:
|
|
name: {{ include "prometheus-postgres-exporter.fullname" $ }}
|
|
port:
|
|
number: {{ $.Values.services.http.port }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.ingress.tls }}
|
|
tls:
|
|
{{- range .Values.ingress.tls }}
|
|
- hosts:
|
|
{{- range .hosts }}
|
|
- {{ tpl . $ | quote }}
|
|
{{- end }}
|
|
secretName: {{ .secretName | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }} |