datadog-controller

by Delivery Hero

Helm chartv1.2.0App 0.1Verified publisher

This is a simple [Kubernetes Controller](https://kubernetes.io/docs/concepts/architecture/controller/) to allow [Datadog Monitors](https://docs.datadoghq.com/monitors/) to be created, updated or deleted from custom resources in Kubernetes. You will need to set `datadog.client_api_key` and `datadog.client_app_key` when installing the chart. These keys can be found at https://app.datadoghq.eu/account/settings#api or https://app.datadoghq.com/account/settings#api Here's an example `DatadogMonitor` resource: ```yaml apiVersion: datadoghq.com/v1beta1 kind: DatadogMonitor metadata: name: apm-error-rate-example spec: name: my-service error rate query: "avg(last_5m):sum:trace.http.request.errors{env:stg,service:my-service} / sum:trace.http.request.hits{env:stg,service:my-service} > 1" type: "query alert" message: Service my-service has a high error rate on env:stg ```

About this chart

datadog-controller

This is a simple Kubernetes Controller to allow Datadog Monitors to be created, updated or deleted from custom resources in Kubernetes.

You will need to set datadog.client_api_key and datadog.client_app_key when installing the chart. These keys can be found at https://app.datadoghq.eu/account/settings#api or https://app.datadoghq.com/account/settings#api

Here's an example DatadogMonitor resource:

apiVersion: datadoghq.com/v1beta1
kind: DatadogMonitor
metadata:
  name: apm-error-rate-example
spec:
  name: my-service error rate
  query: "avg(last_5m):sum:trace.http.request.errors{env:stg,service:my-service} / sum:trace.http.request.hits{env:stg,service:my-service} > 1"
  type: "query alert"
  message: Service my-service has a high error rate on env:stg

Homepage: https://github.com/max-rocket-internet/datadog-controller

How to install this chart

A simple install with default values, latest chart version and generated name:

helm install --generate-name oci://ghcr.io/deliveryhero/helm-charts/datadog-controller

To install a specific version of this chart:

helm install --generate-name oci://ghcr.io/deliveryhero/helm-charts/datadog-controller --version 1.2

To install the chart with the release name my-release:

helm install my-release oci://ghcr.io/deliveryhero/helm-charts/datadog-controller

To install with some set values:

helm install my-release oci://ghcr.io/deliveryhero/helm-charts/datadog-controller --set values_key1=value1 --set values_key2=value2

To install with custom values file:

helm install my-release oci://ghcr.io/deliveryhero/helm-charts/datadog-controller -f values.yaml

Source Code

Values

KeyTypeDefaultDescription
affinityobject{}
controller.environmentobject{}Any extra environment variables for the controller
controller.leaderElectionboolfalseEnable leader election for running multiple controller pods
controller.logLevelstring"DEBUG"The log level of the controller. Can be either "DEBUG" or "INFO"
controller.metricAddrstring"0"Address to serve prometheus metrics on. "0" is disabled.
datadog.client_api_keystring"put_your_api_key_here"Your Datadog API key, you can get/create one at https://app.datadoghq.eu/account/settings#api
datadog.client_app_keystring"put_your_app_key_here"Your Datadog API key, you can get/create one at https://app.datadoghq.eu/account/settings#api
datadog.hoststring"datadoghq.eu"The datadog host. Usually datadoghq.eu or datadoghq.com
extraLabelsobject{}
fullnameOverridestring""
image.pullPolicystring"IfNotPresent"
image.repositorystring"maxrocketinternet/datadog-controller"
image.tagstring""
imagePullSecretslist[]
nameOverridestring""
nodeSelectorobject{}
podAnnotationsobject{}
podSecurityContextobject{}
replicaCountint1
resources.limits.cpustring"100m"
resources.limits.memorystring"128Mi"
resources.requests.cpustring"100m"
resources.requests.memorystring"128Mi"
securityContextobject{}
serviceAccount.annotationsobject{}
serviceAccount.createbooltrue
serviceAccount.namestring""
tolerationslist[]

Maintainers

NameEmailUrl
max-rocket-internethttps://github.com/max-rocket-internet

Chart source and versions

Chart source: github.com/deliveryhero/helm-charts/datadog-controller

Older chart versions: github.com/deliveryhero/helm-charts/pkgs/container/helm-charts/datadog-controller

Deploy datadog-controller with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has datadog-controller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdatadog-controller is pinned at v1.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply