{{- if not .Values.datadog.apiKeyExistingSecret -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "datadog.fullname" . }}
  labels:
    app: {{ template "datadog.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
type: Opaque
data:
  api-key: {{ default "MISSING" .Values.datadog.apiKey | b64enc | quote }}
{{- end -}}
