{{- if and .Values.ldapAuth.encodedTrustedCACertificate (not .Values.ldapAuth.externalSecretForTrustedCACertificate) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "mlflow.fullname" . }}-trusted-ca-cert-secret
  labels:
    app: {{ template "mlflow.name" . }}
    chart: {{ template "mlflow.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  ca.crt: {{ .Values.ldapAuth.encodedTrustedCACertificate }}
{{- end }}
