{{- $operatorValues :=  index .Values "reporting-operator" -}}
{{- if $operatorValues.spec.config.hive.auth.createSecret -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ $operatorValues.spec.config.hive.auth.secretName }}
  labels:
    app: reporting-operator
type: Opaque
data:
  tls.crt: {{ $operatorValues.spec.config.hive.auth.certificate | b64enc | quote }}
  tls.key: {{ $operatorValues.spec.config.hive.auth.key | b64enc | quote }}
{{- end -}}
