forked from coo-ops.space/helm-charts
41 lines
970 B
YAML
41 lines
970 B
YAML
|
{{- if .Values.ingress.enabled -}}
|
||
|
{{- $serviceName := .Release.Name -}}
|
||
|
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
kind: Ingress
|
||
|
metadata:
|
||
|
name: {{ .Release.Name }}
|
||
|
{{- with .Values.ingress.annotations }}
|
||
|
annotations:
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
spec:
|
||
|
{{- 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 }}
|
||
|
rules:
|
||
|
{{- range .Values.ingress.hosts }}
|
||
|
- host: {{ .host | quote }}
|
||
|
http:
|
||
|
paths:
|
||
|
{{- range .paths }}
|
||
|
- path: {{ .path }}
|
||
|
pathType: {{ .pathType }}
|
||
|
backend:
|
||
|
service:
|
||
|
name: {{ $serviceName }}
|
||
|
port:
|
||
|
number: 5000
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|