Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.md (Kubernetes yaml manifest for NPM module) #26276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions content/en/network_monitoring/performance/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ If you are not using Helm, you can enable Network Performance Monitoring with Ku

If you already have the [Agent running with a manifest][4]:

1. Add the annotation `container.apparmor.security.beta.kubernetes.io/system-probe: unconfined` on the `datadog-agent` template:
1. Prior to Kubernetes 1.30 : add the annotation `container.apparmor.security.beta.kubernetes.io/system-probe: unconfined` on the `datadog-agent` template:

```yaml
spec:
Expand All @@ -255,6 +255,26 @@ If you already have the [Agent running with a manifest][4]:
annotations:
container.apparmor.security.beta.kubernetes.io/system-probe: unconfined
```
For and after Kubernetes 1.30 : add the following `securityContext` on the `datadog-agent` template:

```yaml
spec:
selector:
matchLabels:
app: datadog-agent
template:
metadata:
labels:
app: datadog-agent
name: datadog-agent
spec:
serviceAccountName: datadog-agent
securityContext:
appArmorProfile:
type: Unconfined
containers:
# (...)
```

2. Enable process collection and the system probe with the following environment variables in the Agent DaemonSet. If you are running a container per Agent process, add the following environment variables to the Process Agent container; otherwise, add them to the Agent container.

Expand All @@ -270,6 +290,8 @@ If you already have the [Agent running with a manifest][4]:
value: 'true'
- name: DD_SYSPROBE_SOCKET
value: /var/run/sysprobe/sysprobe.sock
- name: DD_AUTH_TOKEN_FILE_PATH
value: /etc/datadog-agent/auth/token
```

3. Mount the following extra volumes into the `datadog-agent` container:
Expand All @@ -293,6 +315,9 @@ If you already have the [Agent running with a manifest][4]:
mountPath: /sys/kernel/debug
- name: sysprobe-socket-dir
mountPath: /var/run/sysprobe
- name: auth-token
mountPath: /etc/datadog-agent/auth
readOnly: false # needs RW to write auth token
```

4. Add a new system-probe as a side car to the Agent:
Expand Down Expand Up @@ -322,15 +347,19 @@ If you already have the [Agent running with a manifest][4]:
command:
- /opt/datadog-agent/embedded/bin/system-probe
env:
- name: DD_SYSTEM_PROBE_ENABLED
value: 'true'
- name: DD_SYSPROBE_SOCKET
value: /var/run/sysprobe/sysprobe.sock
- name: DD_AUTH_TOKEN_FILE_PATH
value: /etc/datadog-agent/auth/token
resources:
requests:
memory: 150Mi
cpu: 200m
limits:
memory: 150Mi
cpu: 200m
memory: 300Mi
cpu: 400m
volumeMounts:
- name: procdir
mountPath: /host/proc
Expand All @@ -342,20 +371,24 @@ If you already have the [Agent running with a manifest][4]:
mountPath: /sys/kernel/debug
- name: sysprobe-socket-dir
mountPath: /var/run/sysprobe
- name: auth-token
mountPath: /etc/datadog-agent/auth
readOnly: true
```

5. Finally, add the following volumes to your manifest:

```yaml
volumes:
- name: sysprobe-socket-dir
emptyDir: {}
- name: debugfs
hostPath:
path: /sys/kernel/debug
- name: sysprobe-socket-dir
emptyDir: { }
- name: auth-token
emptyDir: { }
```


[1]: https://github.com/DataDog/helm-charts/blob/master/charts/datadog/README.md#enabling-system-probe-collection
[2]: /resources/yaml/datadog-agent-npm.yaml
[3]: https://app.datadoghq.com/organization-settings/api-keys
Expand Down