che-server/deploy/kubernetes/helm/che/templates/dashboard-ingress.yaml

56 lines
1.8 KiB
YAML

#
# Copyright (c) 2012-2019 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# If single-host powered by gateway is configured - the corresponding gateway configmap is expexted to be created
# but not this ingress
{{- if not (and (eq .Values.global.serverStrategy "single-host") (eq .Values.global.singleHostExposure "gateway")) }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: che-dashboard-ingress
labels:
app: che
component: che-dashboard
annotations:
kubernetes.io/ingress.class: {{ .Values.global.ingress.class | quote }}
{{ .Values.global.ingressAnnotationsPrefix }}ingress.kubernetes.io/proxy-read-timeout: "3600"
{{ .Values.global.ingressAnnotationsPrefix }}ingress.kubernetes.io/proxy-connect-timeout: "3600"
{{- if and .Values.global.tls .Values.global.tls.enabled }}
{{ .Values.global.ingressAnnotationsPrefix }}ingress.kubernetes.io/ssl-redirect: "true"
{{- else }}
{{ .Values.global.ingressAnnotationsPrefix }}ingress.kubernetes.io/ssl-redirect: "false"
{{- end }}
spec:
{{- if .Values.global.tls.enabled }}
tls:
- hosts:
- {{ template "cheHost" . }}
{{- if .Values.global.tls.secretName }}
secretName: {{ .Values.global.tls.secretName }}
{{- end -}}
{{- end }}
rules:
{{- if ne .Values.global.serverStrategy "default-host" }}
- host: {{ template "cheHost" . }}
http:
{{- else }}
- http:
{{- end }}
paths:
# The path rule for Che Dashboard
- path: {{ .Values.dashboard.ingressPath }}
pathType: ImplementationSpecific
backend:
service:
name: che-dashboard
port:
number: 8080
{{- end }}