37 lines
959 B
YAML
37 lines
959 B
YAML
{{- $route := .Values.route -}}
|
|
{{- if $route.enabled -}}
|
|
{{ include "authEnabled.check" . }}
|
|
apiVersion: route.openshift.io/v1
|
|
kind: Route
|
|
metadata:
|
|
name: {{ .Release.Name }}-route
|
|
{{- with $route.annotations }}
|
|
namespace: {{ .Release.Namespace }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
labels:
|
|
{{ include "helm.labels" . | indent 4 }}
|
|
{{- with $route.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
host: {{ $route.host }}
|
|
path: /{{ default .Release.Name $route.path | trimPrefix "/" | trimSuffix "/" }}/
|
|
port:
|
|
targetPort: http
|
|
to:
|
|
kind: Service
|
|
name: gateway
|
|
weight: 100
|
|
{{- if $route.tls.enabled }}
|
|
tls:
|
|
{{- if $route.tls.insecureEdgeTerminationPolicy }}
|
|
insecureEdgeTerminationPolicy: {{ $route.tls.insecureEdgeTerminationPolicy }}
|
|
{{- end }}
|
|
{{- if $route.tls.termination }}
|
|
termination: {{ $route.tls.termination }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end -}}
|