Commit 6ae841fa authored by Joe Mayer's avatar Joe Mayer

Initial commit

parents

Too many changes to show.

To preserve performance only 532 of 532+ files are displayed.
### Enabling the Datadog Cluster Agent
Read about the Datadog Cluster Agent in the [official documentation](https://docs.datadoghq.com/agent/kubernetes/cluster/).
Run the following if you want to deploy the chart with the Datadog Cluster Agent.
Note that specifying `clusterAgent.metricsProvider.enabled=true` will enable the External Metrics Server.
If you want to learn to use this feature, you can check out this [walkthrough](https://github.com/DataDog/datadog-agent/blob/master/docs/cluster-agent/CUSTOM_METRICS_SERVER.md).
The Leader Election is enabled by default in the chart for the Cluster Agent. Only the Cluster Agent(s) participate in the election, in case you have several replicas configured (using `clusterAgent.replicas`.
You can specify the token used to secure the communication between the Cluster Agent(s)q and the Agents with `clusterAgent.token`. If not specified, a random one will be generated and you will be prompted a warning when installing the chart.
```bash
helm install --name datadog-monitoring \
--set datadog.apiKey=YOUR-API-KEY-HERE \
--set datadog.appKey=YOUR-APP-KEY-HERE \
--set clusterAgent.enabled=true \
--set clusterAgent.metricsProvider.enabled=true \
stable/datadog
```
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```bash
helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following table lists the configurable parameters of the Datadog chart and their default values.
| Parameter | Description | Default |
|-----------------------------|------------------------------------|-------------------------------------------|
| `datadog.apiKey` | Your Datadog API key | `Nil` You must provide your own key |
| `datadog.apiKeyExistingSecret` | If set, use the secret with a provided name instead of creating a new one |`nil` |
| `datadog.appKey` | Datadog APP key required to use metricsProvider | `Nil` You must provide your own key |
| `datadog.appKeyExistingSecret` | If set, use the secret with a provided name instead of creating a new one |`nil` |
| `image.repository` | The image repository to pull from | `datadog/agent` |
| `image.tag` | The image tag to pull | `6.9.0` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Image pull secrets | `nil` |
| `rbac.create` | If true, create & use RBAC resources | `true` |
| `rbac.serviceAccount` | existing ServiceAccount to use (ignored if rbac.create=true) | `default` |
| `datadog.name` | Container name if Daemonset or Deployment | `datadog` |
| `datadog.site` | Site ('datadoghq.com' or 'datadoghq.eu') | `nil` |
| `datadog.dd_url` | Datadog intake server | `nil` |
| `datadog.env` | Additional Datadog environment variables | `nil` |
| `datadog.logsEnabled` | Enable log collection | `nil` |
| `datadog.logsConfigContainerCollectAll` | Collect logs from all containers | `nil` |
| `datadog.logsPointerHostPath` | Host path to store the log tailing state in | `/var/lib/datadog-agent/logs` |
| `datadog.apmEnabled` | Enable tracing from the host | `nil` |
| `datadog.processAgentEnabled` | Enable live process monitoring | `nil` |
| `datadog.checksd` | Additional custom checks as python code | `nil` |
| `datadog.confd` | Additional check configurations (static and Autodiscovery) | `nil` |
| `datadog.criSocketPath` | Path to the container runtime socket (if different from Docker) | `nil` |
| `datadog.tags` | Set host tags | `nil` |
| `datadog.nonLocalTraffic` | Enable statsd reporting from any external ip | `False` |
| `datadog.useCriSocketVolume` | Enable mounting the container runtime socket in Agent containers | `True` |
| `datadog.dogstatsdOriginDetection` | Enable origin detection for container tagging | `False` |
| `datadog.useDogStatsDSocketVolume` | Enable dogstatsd over Unix Domain Socket | `False` |
| `datadog.volumes` | Additional volumes for the daemonset | `nil` |
| `datadog.volumeMounts` | Additional volumeMounts for the daemonset | `nil` |
| `datadog.podAnnotationsAsTags` | Kubernetes Annotations to Datadog Tags mapping | `nil` |
| `datadog.podLabelsAsTags` | Kubernetes Labels to Datadog Tags mapping | `nil` |
| `datadog.resources.requests.cpu` | CPU resource requests | `200m` |
| `datadog.resources.limits.cpu` | CPU resource limits | `200m` |
| `datadog.resources.requests.memory` | Memory resource requests | `256Mi` |
| `datadog.resources.limits.memory` | Memory resource limits | `256Mi` |
| `datadog.securityContext` | Allows you to overwrite the default securityContext applied to the container | `nil` |
| `datadog.livenessProbe` | Overrides the default liveness probe | http port 5555 |
| `datadog.hostname` | Set the hostname (write it in datadog.conf) | `nil` |
| `datadog.acInclude` | Include containers based on image name | `nil` |
| `datadog.acExclude` | Exclude containers based on image name | `nil` |
| `daemonset.podAnnotations` | Annotations to add to the DaemonSet's Pods | `nil` |
| `daemonset.tolerations` | List of node taints to tolerate (requires Kubernetes >= 1.6) | `nil` |
| `daemonset.nodeSelector` | Node selectors | `nil` |
| `daemonset.affinity` | Node affinities | `nil` |
| `daemonset.useHostNetwork` | If true, use the host's network | `nil` |
| `daemonset.useHostPID`. | If true, use the host's PID namespace | `nil` |
| `daemonset.useHostPort` | If true, use the same ports for both host and container | `nil` |
| `daemonset.priorityClassName` | Which Priority Class to associate with the daemonset| `nil` |
| `datadog.leaderElection` | Enable the leader Election feature | `false` |
| `datadog.leaderLeaseDuration`| The duration for which a leader stays elected.| `nil` |
| `datadog.collectEvents` | Enable Kubernetes event collection. Requires leader election. | `false` |
| `kubeStateMetrics.enabled` | If true, create kube-state-metrics | `true` |
| `kube-state-metrics.rbac.create`| If true, create & use RBAC resources for kube-state-metrics | `true` |
| `kube-state-metrics.rbac.serviceAccount` | existing ServiceAccount to use (ignored if rbac.create=true) for kube-state-metrics | `default` |
| `clusterAgent.enabled` | Use the cluster-agent for cluster metrics (Kubernetes 1.10+ only) | `false` |
| `clusterAgent.token` | A cluster-internal secret for agent-to-agent communication. Must be 32+ characters a-zA-Z | Generates a random value |
| `clusterAgent.containerName` | The container name for the Cluster Agent | `cluster-agent` |
| `clusterAgent.image.repository` | The image repository for the cluster-agent | `datadog/cluster-agent` |
| `clusterAgent.image.tag` | The image tag to pull | `1.0.0` |
| `clusterAgent.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `clusterAgent.image.pullSecrets` | Image pull secrets | `nil` |
| `clusterAgent.metricsProvider.enabled` | Enable Datadog metrics as a source for HPA scaling | `false` |
| `clusterAgent.resources.requests.cpu` | CPU resource requests | `200m` |
| `clusterAgent.resources.limits.cpu` | CPU resource limits | `200m` |
| `clusterAgent.resources.requests.memory` | Memory resource requests | `256Mi` |
| `clusterAgent.resources.limits.memory` | Memory resource limits | `256Mi` |
| `clusterAgent.tolerations` | List of node taints to tolerate | `[]` |
| `clusterAgent.livenessProbe` | Overrides the default liveness probe | http port 443 if external metrics enabled |
| `clusterAgent.readinessProbe` | Overrides the default readiness probe | http port 443 if external metrics enabled |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
helm install --name my-release \
--set datadog.apiKey=YOUR-KEY-HERE,datadog.logLevel=DEBUG \
stable/datadog
```
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
```bash
helm install --name my-release -f my-values.yaml stable/datadog
```
**Tip**: You can copy and customize the default [values.yaml](values.yaml)
### Image repository and tag
Datadog [offers two variants](https://hub.docker.com/r/datadog/agent/tags/), switch to a `-jmx` tag if you need to run JMX/java integrations. The chart also supports running [the standalone dogstatsd image](https://hub.docker.com/r/datadog/dogstatsd/tags/).
Starting with version 1.0.0, this chart does not support deploying Agent 5.x anymore. If you cannot upgrade to Agent 6.x, you can use a previous version of the chart by calling helm install with `--version 0.18.0`.
### DaemonSet and Deployment
By default, the Datadog Agent runs in a DaemonSet. It can alternatively run inside a Deployment for special use cases.
**Note:** simultaneous DaemonSet + Deployment installation within a single release will be deprecated in a future version, requiring two releases to achieve this.
### Secret
By default, this Chart creates a Secret and puts an API key in that Secret.
However, you can use manually created secret by setting the `datadog.apiKeyExistingSecret` value.
### confd and checksd
The Datadog [entrypoint
](https://github.com/DataDog/datadog-agent/blob/master/Dockerfiles/agent/entrypoint/89-copy-customfiles.sh)
will copy files with a `.yaml` extension found in `/conf.d` and files with `.py` extension in
`/check.d` to `/etc/datadog-agent/conf.d` and `/etc/datadog-agent/checks.d` respectively. The keys for
`datadog.confd` and `datadog.checksd` should mirror the content found in their
respective ConfigMaps, ie
```yaml
datadog:
confd:
redisdb.yaml: |-
ad_identifiers:
- redis
- bitnami/redis
init_config:
instances:
- host: "%%host%%"
port: "%%port%%"
jmx.yaml: |-
ad_identifiers:
- openjdk
instance_config:
instances:
- host: "%%host%%"
port: "%%port_0%%"
redisdb.yaml: |-
init_config:
instances:
- host: "outside-k8s.example.com"
port: 6379
```
For more details, please refer to [the documentation](https://docs.datadoghq.com/agent/kubernetes/integrations/).
### Kubernetes event collection
To enable event collection, you will need to set the `datadog.leaderElection`, `datadog.collectEvents` and `rbac.create` options to `true`.
It is now recommended to use the Datadog Cluster Agent to collect the events - Refer to the [Enabling the Datadog Cluster Agent](#enabling-the-datadog-cluster-agent) section.
Please read [the official documentation](https://docs.datadoghq.com/agent/kubernetes/event_collection/) for more context.
### Kubernetes Labels and Annotations
To map Kubernetes pod labels and annotations to Datadog tags, provide a dictionary with kubernetes labels/annotations as keys and datadog tags as values:
```yaml
podAnnotationsAsTags:
iam.amazonaws.com/role: kube_iamrole
```
```yaml
podLabelsAsTags:
app: kube_app
release: helm_release
```
### CRI integration
As of the version 6.6.0, the Datadog Agent supports collecting metrics from any container runtime interface used in your cluster.
Configure the location path of the socket with `datadog.criSocketPath` and make sure you allow the socket to be mounted into the pod running the agent by setting `datadog.useCriSocketVolume` to `True`.
Standard paths are:
- Containerd socket: `/var/run/containerd/containerd.sock`
- Cri-o socket: `/var/run/crio/crio.sock`
# Datadog
[Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform.
## Introduction
This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/kubernetes/charts/tree/master/stable/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/).
For more details of the datadog-agent v6 environment configurations, please reference the [docs](https://github.com/DataDog/datadog-agent/tree/master/Dockerfiles/agent) here.
rancher_max_version: 2.3.1
questions:
#image configurations
- variable: defaultImage
default: "true"
description: "Use default Datadog image or specify a custom one"
label: Use Default Datadog Image
type: boolean
show_subquestion_if: false
group: "Container Images"
subquestions:
- variable: image.repository
default: "datadog/agent"
description: "Datadog image name"
type: string
label: Datadog Image Name
- variable: image.tag
default: "6.9.0"
description: "Datadog Image Tag"
type: string
label: Datadog Image Tag
- variable: clusterAgent.image.repository
default: "datadog/cluster-agent"
description: "Datadog clusterAgent image name"
type: string
label: Datadog ClusterAgent Image Name
- variable: clusterAgent.image.tag
default: "1.1.0"
description: "Datadog ClusterAgent Image Tag"
type: string
label: Datadog ClusterAgent Image Tag
- variable: kubeStateMetrics.image.repository
default: "quay.io/coreos/kube-state-metrics"
description: "KubeState image name"
type: string
label: KubeState Image Name
show_if: "kubeStateMetrics.enabled=true&&defaultImage=false"
- variable: kubeStateMetrics.image.tag
default: "v1.4.0"
description: "KubeState Image Tag"
type: string
label: KubeState Image Tag
show_if: "kubeStateMetrics.enabled=true&&defaultImage=false"
#cluster agent configurations
- variable: clusterAgent.enabled
default: false
description: "Use the cluster-agent for cluster metrics (Kubernetes 1.10+ only), https://docs.datadoghq.com/agent/kubernetes/cluster/"
type: boolean
label: Enable Cluster Agent Metrics(Kubernetes 1.10+ only)
group: "Cluster Agent"
- variable: clusterAgent.metricsProvider.enabled
default: true
description: "Enable the metricsProvider to be able to scale based on metrics in Datadog"
type: boolean
label: Enable the metricsProvider
show_if: "clusterAgent.enabled=true"
group: "Cluster Agent"
- variable: datadog.appKey
default: ""
description: "Datadog App key required to use metricsProvider"
type: string
required: true
label: Datadog Metrics App Key
group: "Cluster Agent"
show_if: "clusterAgent.enabled=true&&clusterAgent.metricsProvider.enabled=true"
#datadog agent configurations
- variable: datadog.apiKey
default: ""
description: "Enter your Datadog API Key."
type: string
label: Datadog API Key
group: "Agent Configuration"
required: true
- variable: datadog.site
default: "datadoghq.com"
description: "The site of the Datadog intake to send Agent data to"
type: enum
label: Datadog Site URL
group: "Agent Configuration"
required: true
options:
- "datadoghq.com"
- "datadoghq.eu"
- "custom"
- variable: datadog.dd_url
required: true
default: ""
description: "The host of the Datadog intake server to send Agent data to, only set this option if you need the Agent to send data to a custom URL"
type: string
label: Datadog Custom Site URL
group: "Agent Configuration"
show_if: "datadog.site=custom"
- variable: datadog.logLevel
default: "warn"
description: "Set Agent logging verbosity"
type: enum
options:
- "trace"
- "debug"
- "info"
- "warn"
- "error"
- "critical"
- "off"
label: Log Level
group: "Agent Configuration"
- variable: datadog.tags
default: ""
description: "Host tags, separated by spaces. For example: 'simple-tag-0 tag-key-1:tag-value-1'"
type: string
label: Host Tags
group: "Agent Configuration"
- variable: datadog.useCriSocketVolume
default: true
description: "Enable container runtime socket volume mounting"
type: boolean
label: Enable Mounting The Container Runtime Socket In Agent Containers
group: "Agent Configuration"
- variable: datadog.criSocketPath
default: ""
description: "Path to the container runtime socket (if different from Docker), default to `/var/run/docker.sock`"
type: string
label: Path To The Container Runtime Socket(Optional)
group: "Agent Configuration"
show_if: "datadog.useCriSocketVolume=true"
- variable: datadog.nonLocalTraffic
default: false
description: "Whether DogStatsD should listen to non local UDP traffic, required to send custom metrics"
type: boolean
label: DogStatsD Non-Local Traffic
group: "Agent Configuration"
- variable: datadog.collectEvents
default: false
description: "Enable event collection from the kubernetes API"
type: boolean
label: Collect Events
group: "Agent Configuration"
# Datadog Tagging
- variable: datadog.podLabelsAsTags
default: ""
description: "Specify a JSON map, where the map key is the source label name and the map value the datadog tag name. E.g: '{\"app\":\"kube_app\",\"release\":\"helm_release\"}'"
type: string
label: Extract Pod Labels as Tags
group: "Datadog Tagging"
- variable: datadog.podAnnotationsAsTags
default: ""
description: "Specify a JSON map, where the map key is the source label name and the map value the datadog tag name. E.g: '{\"app\":\"kube_app\",\"release\":\"helm_release\"}'"
type: string
label: Extract Pod Annotations as Tags
group: "Datadog Tagging"
- variable: datadog.nodeLabelsAsTags
default: ""
description: "Specify a JSON map, where the map key is the source label name and the map value the datadog tag name. E.g: '{\"app\":\"kube_app\",\"release\":\"helm_release\"}'"
type: string
label: Extract Node Labels As Tags
group: "Datadog Tagging"
#daemonset configurations
- variable: daemonset.rkeETCDControlPlane
default: true
description: "Configure Datadog Agent pods with the required tolerations to be deployed on the RKE etcd and control plane."
type: boolean
label: Run datadog pod on RKE Control Plane Nodes
group: "Daemonset Configuration"
- variable: daemonset.useHostNetwork
default: false
description: "Bind ports on the hostNetwork. Useful for CNI networking where hostPort might not be supported. The ports will need to be available on all hosts"
type: boolean
label: Use HostNetwork
group: "Daemonset Configuration"
- variable: daemonset.useHostPort
default: false
description: "Sets the hostPort to the same value of the container port"
type: boolean
label: Use HostPort
group: "Daemonset Configuration"
- variable: daemonset.useHostPID
default: false
description: "Run the agent in the host's PID namespace"
type: boolean
label: Use HostPID
group: "Daemonset Configuration"
#proxy configurations
- variable: datadog.httpProxy
default: ""
description: "An http URL to use as a proxy for http requests"
type: string
label: Datadog Proxy for HTTP Requests
group: "Proxy Configuration"
- variable: datadog.httpsProxy
default: ""
description: "An http URL to use as a proxy for https requests"
type: string
label: Datadog Proxy for HTTPS Requests
group: "Proxy Configuration"
- variable: datadog.noProxy
default: ""
description: "a space-separated list of URLs for which no proxy should be used"
type: string
label: Datadog No-Proxy List(separated by a space)
group: "Proxy Configuration"
# Optional Collection agents
- variable: datadog.apmEnabled
default: false
description: "Run the trace-agent along with the infrastructure agent, allowing the container to accept traces on 8126/tcp"
type: boolean
label: Enable APM
group: "Optional Collection Agents"
- variable: datadog.apmNonLocalTraffic
default: false
description: "Allow non-local traffic when tracing from other containers"
type: boolean
label: Allow APM Non-local Traffic
group: "Optional Collection Agents"
- variable: datadog.processAgentEnabled
default: false
description: "Enable live process collection in the process-agent"
type: boolean
label: Enable Live Process Agent
group: "Optional Collection Agents"
- variable: datadog.logsEnabled
default: false
description: "Run the log-agent along with the infrastructure agent"
type: boolean
label: Collect Logs
group: "Optional Collection Agents"
#Kube State Metrics
- variable: kubeStateMetrics.enabled
default: true
description: "Create a kube-state-metrics deployment"
type: boolean
label: Deployment KubeState Metrics Deployment
group: "Kube-State-Metrics"
dependencies:
- name: kube-state-metrics
repository: https://kubernetes-charts.storage.googleapis.com/
version: 0.13.1
digest: sha256:4eeef86887d04fc0fadad89d23d9aba59aac95bdf70b3122046bcdb3fde8a10d
generated: 2019-02-11T11:42:33.861791+08:00
dependencies:
- name: kube-state-metrics
version: 0.13.1
repository: https://kubernetes-charts.storage.googleapis.com/
condition: kubeStateMetrics.enabled
{{- if (or (.Values.datadog.apiKeyExistingSecret) (.Values.datadog.apiKey)) }}
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 (.Values.datadog.apiKey) }}
{{- 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 }}
{{- if not .Values.clusterAgent.token }}
##############################################################################
#### INFO: You did not set a clusterAgent.token ####
##############################################################################
Because you enabled the Cluster Agent but did not provide a token, a random token was generated.
This token is used to secure the communication between the Agents and the Cluster Agent.
Make sure to recreate all pods on upgrade (with the --recreate-pods flag) to ensure all
agents use the same shared token.
{{- end }}
{{- end }}
{{- if .Values.datadog.apmEnabled }}
The datadog agent is listening on port 8126.
{{- 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.confd.fullname" . }} 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.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, you can use a previous version
of the chart by calling helm install with `--version 0.18.0`.
{{- end }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment