{{- if .Values.presto.spec.config.auth.createSecret -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ .Values.presto.spec.config.auth.secretName }}
  labels:
    app: presto
type: Opaque
data:
  tls.crt: {{ .Values.presto.spec.config.auth.certificate | b64enc | quote }}
  tls.key: {{ .Values.presto.spec.config.auth.key | b64enc | quote }}
  ca.crt: {{.Values.presto.spec.config.auth.caCertificate | b64enc | quote }}
{{- end -}}
