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