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