{{- if .Values.global.openshift }}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: {{ .Release.Name }}
spec:
{{- if .Values.route.useCertManager }}
  host: {{ .Release.Name }}-{{ .Release.Namespace }}.apps.{{ required "Provide dns zone in values" .Values.dns.zone }}

{{- end }}
  port:
    targetPort: https
  tls:
    insecureEdgeTerminationPolicy: Redirect
    termination: passthrough
  to:
    kind: Service
    name: vault-active
  wildcardPolicy: None
{{- end }}
