{{- $operatorValues :=  index .Values "reporting-operator" -}}
{{- if $operatorValues.spec.route.enabled }}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: {{ $operatorValues.spec.route.name }}
spec:
  port:
    targetPort: api
  tls:
    termination: Reencrypt
    insecureEdgeTerminationPolicy: Allow
  to:
    kind: Service
    name: reporting-operator
{{- end }}
