{{ if eq .Values.global.platform "openshift" }}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  labels:
    app: jenkins
    {{- include "jenkins-operator.labels" . | nindent 4 }}
  {{- with .Values.jenkins.ingress.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
  name: jenkins
spec:
  host: {{ include "jenkins-operator.jenkinsBaseUrl" . }}
  path: {{ include "jenkins-operator.jenkinsBasePath" . }}
  port:
    targetPort: 8080
  tls:
    insecureEdgeTerminationPolicy: Redirect
    termination: edge
  to:
    kind: Service
    name: jenkins
    weight: 100
  wildcardPolicy: None
status:
  ingress: []
{{ end }}
