{{- if not .Values.datadog.apiKeyExistingSecret }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "datadog.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
{{ include "datadog.labels" . | indent 4 }}
type: Opaque
data:
  api-key: {{ default "MISSING" .Values.datadog.apiKey | b64enc | quote }}
{{- end }}
