#################################################################
####          WARNING: This repository is deprecated         ####
#################################################################

Following upcoming deprecation of https://github.com/helm/charts repository
The stable/datadog Helm chart has been moved to helm.datadoghq.com (source: https://github.com/DataDog/helm-charts)

You can add new repository by running:
  helm repo add datadog https://helm.datadoghq.com
  helm repo update

You can now replace stable/datadog by datadog/datadog in all your Helm commands

{{- if (or (.Values.datadog.apiKeyExistingSecret) (not (eq .Values.datadog.apiKey "<DATADOG_API_KEY>"))) }}
Datadog agents are spinning up on each node in your cluster. After a few
minutes, you should see your agents starting in your event stream:
    https://app.datadoghq.com/event/stream

  {{- if .Values.datadog.apiKeyExistingSecret }}
You disabled creation of Secret containing API key, therefore it is expected
that you create Secret named '{{ .Values.datadog.apiKeyExistingSecret }}' which includes a key called 'api-key' containing the API key.
  {{- else if not (eq .Values.datadog.apiKey "<DATADOG_API_KEY>") }}
  {{- end }}
{{- else }}
##############################################################################
####               ERROR: You did not set a datadog.apiKey.               ####
##############################################################################

This deployment will be incomplete until you get your API key from Datadog.
One can sign up for a free Datadog trial at https://app.datadoghq.com/signup

Once registered you can request an API key at:

    https://app.datadoghq.com/account/settings#agent/kubernetes

Then run:

    helm upgrade {{ .Release.Name }} \
        --set datadog.apiKey=YOUR-KEY-HERE stable/datadog
{{- end }}

{{- if .Values.clusterAgent.enabled }}

  {{- if .Values.clusterAgent.metricsProvider.enabled }}
    {{- if .Values.datadog.appKeyExistingSecret }}
You disabled creation of Secret containing APP key, therefore it is expected
that you create a Secret named '{{ .Values.datadog.appKeyExistingSecret }}' which includes a key called 'app-key' containing the APP key.
    {{- else if (.Values.datadog.appKey) }}
    {{- else }}

##############################################################################
####               ERROR: You did not set a datadog.appKey.               ####
##############################################################################

This deployment will be incomplete until you get your APP key from Datadog.
Create an application key at https://app.datadoghq.com/account/settings#api
    {{- end }}
  {{- end }}

{{- end }}

{{- if .Values.datadog.apm.enabled }}
The Datadog Agent is listening on port {{ .Values.datadog.apm.port }} for APM service.
{{- end }}

{{- if .Values.datadog.autoconf }}

#################################################################
####               WARNING: Deprecation notice               ####
#################################################################

The autoconf value is deprecated, Autodiscovery templates can now
be safely moved to the confd value. As a temporary measure, both
values were merged into the {{ template "datadog.fullname" . }}-confd configmap,
but this will be removed in a future chart release.
Please note that duplicate file names may have conflicted during
the merge. In that case, the confd entry will take precedence.
{{- end }}

{{- if eq .Values.agents.image.repository "datadog/docker-dd-agent" }}

######################################################################
####               ERROR: Unsupported agent version               ####
######################################################################

This version of the chart does not support deploying Agent 5.x.
If you cannot upgrade to Agent 6.x or later, you can use a previous version
of the chart by calling helm install with `--version 0.18.0`.
{{- end }}
