github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/keycloak/templates/route.yaml (about)

     1  {{- $route := .Values.route -}}
     2  {{- if $route.enabled -}}
     3  apiVersion: route.openshift.io/v1
     4  kind: Route
     5  metadata:
     6    name: {{ include "keycloak.fullname" . }}
     7    namespace: {{ .Release.Namespace }}
     8    {{- with $route.annotations }}
     9    annotations:
    10      {{- range $key, $value := . }}
    11      {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
    12      {{- end }}
    13    {{- end }}
    14    labels:
    15      {{- include "keycloak.labels" . | nindent 4 }}
    16      {{- range $key, $value := $route.labels }}
    17      {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
    18      {{- end }}
    19  spec:
    20  {{- if $route.host }}
    21    host: {{ tpl $route.host $ | quote }}
    22  {{- end }}
    23    path: {{ $route.path }}
    24    port:
    25      {{- if or (not $route.tls.enabled) (eq $route.tls.termination "edge") }}
    26      targetPort: http
    27      {{- else}}
    28      targetPort: https
    29      {{- end}}
    30    to:
    31      kind: Service
    32      name: {{ include "keycloak.fullname" $ }}-http
    33      weight: 100
    34    {{- if $route.tls.enabled }}
    35    tls:
    36      insecureEdgeTerminationPolicy: {{ $route.tls.insecureEdgeTerminationPolicy }}
    37      termination: {{ $route.tls.termination }}
    38    {{- end }}
    39  {{- end -}}