{{- if and (not .Values.enterprise.useExternalLicense) .Values.enterprise.enabled -}}
apiVersion: v1
kind: Secret
metadata:
  name: enterprise-logs-license
  namespace: {{ $.Release.Namespace }}
  labels:
    {{- include "loki.labels" . | nindent 4 }}
data:
  license.jwt: {{ .Values.enterprise.license.contents | b64enc }}
{{- end }}
