helm-charts/openshift-console/templates/ingress.yaml

42 lines
1.2 KiB
YAML

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "openshift-console.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "openshift-console.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- omit . "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className | default (get .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- 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: {{ . }}
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}