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