{{- $operatorValues :=  index .Values "reporting-operator" -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: reporting-operator
  labels:
    app: reporting-operator
{{- if and $operatorValues.spec.authProxy.enabled $operatorValues.spec.route.enabled }}
  annotations:
    serviceaccounts.openshift.io/oauth-redirectreference.reporting-operator: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"{{ $operatorValues.spec.route.name }}"}}'
{{- end }}
