Skip to main content

Datadog Plugin

The rigdev.datadog plugin adds Datadog specific tags to the Deployment and Pods of the capsule as requested here. It can enable/disable the execution of the Datadog Admission Controller on the pods and sets the necessary library and unified service tags.

The config can be templated with standard Go templating and has

.capsule

as its templating context.

Example

Config:

Helm values - Operator
config:
pipeline:
steps:
- plugins:
- plugin: rigdev.datadog
config: |
libraryTag:
java: v1.31.0
unifiedServiceTags:
env: my-env
service: my-service
versin: my-version

The resulting Deployment resource of the Capsule

kind: Deployment
metadata:
labels:
tags.datadoghq.com/env: my-env,
tags.datadoghq.com/service: my-service,
tags.datadoghq.com/version: my-version,
spec:
template:
metadata:
labels:
admission.datadoghq.com/enabled: true,
tags.datadoghq.com/env: my-env,
tags.datadoghq.com/service: my-name,
tags.datadoghq.com/version: my-version,
annotations:
admission.datadoghq.com/java-lib.version: v1.31.0,
...

Config

Configuration for the datadog plugin

FieldDescription
dontAddEnabledAnnotation booleanDontAddEnabledAnnotation toggles if the pods should have an annotation
allowing the Datadog Admission controller to modify them.
libraryTag LibraryTagLibraryTag defines configuration for which datadog libraries to inject into the pods.
unifiedServiceTags UnifiedServiceTagsUnifiedServiceTags configures the values for the Unified Service datadog tags.

LibraryTag

LibraryTag defines configuration for which datadog libraries to let the admission controller inject into the pods The admission controller will inject libraries from a container with the specified tag if the field is set.

FieldDescription
java stringTag of the Java library container
javascript stringTag of the JavaScript library container
python stringTag of the Python library container
net stringTag of the .NET library container
ruby stringTag of the Ruby library container

UnifiedServiceTags

UnifiedServiceTags configures the values of the Unified Service datadog tags on both Deployment and Pods

FieldDescription
env stringThe env tag
service stringThe service tag
version stringThe version tag