You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/containers/cluster_agent/admission_controller.md
+26-8Lines changed: 26 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,29 +128,42 @@ Finally, run the following commands:
128
128
-`kubectl apply -f agent-services.yaml`
129
129
-`kubectl apply -f cluster-agent-deployment.yaml`
130
130
131
-
### APM and DogStatsD
132
131
133
-
To configure and inject APM tracers libraries and DogstatsD clients automatically:
132
+
### APM
133
+
You can configure the Cluster Agent (version 7.39 and higher) to inject APM tracing libraries automatically.
134
134
135
+
After you install the Cluster Agent, do one of the following:
135
136
- Add the label `admission.datadoghq.com/enabled: "true"` to your pod.
136
137
- Configure the Cluster Agent admission controller by setting `mutateUnlabelled` (or `DD_ADMISSION_CONTROLLER_MUTATE_UNLABELLED`, depending on your configuration method) to `true`.
137
138
138
-
To opt-in your container for library injection, use Pod annotations inside your application's YAML file to specify which language tracers and should be injected, along with their versions.
139
+
To opt-in your container for library injection, use Pod annotations inside your application's YAML file to specify language tracers and versions.
140
+
139
141
140
142
The annotations are a `key: value` pair in the following format:
Adding a this annotation results in the injection of the tracer library for that language and version into the containerized application.
149
+
Currently, the list of possible lib values include `java`, `js` and `python` respectively.
150
+
151
+
For example to inject the latest Java tracer:
152
+
153
+
```yaml
154
+
annotations:
155
+
datadoghq.com/java-lib.version: "latest"
144
156
```
145
157
146
-
Adding a this annotation means the tracer library for that language and version is injected into the containerized application. You can add several `<language>-tracer.version` annotations to inject multiple language tracers into one container.
158
+
**Note**: Use caution specifying `latest` as major library releases can introduce breaking changes.
147
159
148
-
For example to inject the latest Java tracer and Ruby tracer version 1.4.0:
160
+
Although it's an uncommon scenario, you can add multiple `<language>-lib.version` annotations to inject multiple language tracers into one container.
149
161
162
+
For example to inject the latest Java tracer and Node tracer v3.0.0:
To prevent pods from receiving environment variables, add the label `admission.datadoghq.com/enabled: "false"`. This works even if you set `mutateUnlabelled: true`.
| `false` | `admission.datadoghq.com/enabled=false` | No |
168
181
182
+
### DogStatsD
183
+
To configure DogstatsD clients or other APM libraries that does not support library injection at this time, inject the environment variables `DD_AGENT_HOST` and `DD_ENTITY_ID` by using one of the following:
184
+
- Add the label `admission.datadoghq.com/enabled: "true"` to your pod.
185
+
- Configure the Cluster Agent admission controller by setting `mutateUnlabelled` (or `DD_ADMISSION_CONTROLLER_MUTATE_UNLABELLED`, depending on your configuration method) to `true`.
186
+
169
187
170
188
#### Order of priority
171
189
The Datadog admission controller does not inject the environment variables `DD_VERSION`, `DD_ENV`, and `DD_SERVICE` if they already exist.
0 commit comments