AppArmor set via deprecated pod annotation instead of securityContext.appArmorProfile in generated agent manifests
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- hugo, kubernetes
- Domain
- devops, documentation
Research direction
Start with hugo/static/resources/yaml/datadog-agent-all-features.yaml and review the Kubernetes Agent installation page's Manifest template links. Find the other templates containing the system-probe container, then compare their AppArmor settings. Done means affected manifests use securityContext.appArmorProfile instead of the deprecated annotation; verify with kubectl apply on Kubernetes 1.30 or newer.
Written by the indexing model from the issue text.
Description
Describe what happened
The sample manifest published at:
sets the AppArmor profile for the system-probe container using the legacy pod annotation:
# Source: datadog/templates/daemonset.yaml
template:
metadata:
annotations:
container.apparmor.security.beta.kubernetes.io/system-probe: unconfined
Applying this manifest to a cluster running Kubernetes 1.30+ produces the following deprecation warning on every kubectl apply:
Warning: spec.template.metadata.annotations[container.apparmor.security.beta.kubernetes.io/system-probe]: deprecated since v1.30; use the "appArmorProfile" field instead
Kubernetes deprecated the container.apparmor.security.beta.kubernetes.io/* annotation in favor of the securityContext.appArmorProfile field starting in v1.30 (GA/stable since v1.30). The annotation mechanism is expected to eventually be removed entirely.
This file is one of several "Manifest template" links on the Kubernetes Agent installation page (the grid with METRICS / LOGS / APM / PROCESS / NPM / SECURITY columns). Any manifest in that grid that includes the system-probe container (NPM and/or Security columns checked) likely has the same annotation, since they all appear to be generated from the same datadog/templates/daemonset.yaml source.
Describe what you expected
The system-probe container should set its AppArmor profile via the modern field, e.g.:
containers:
- name: system-probe
securityContext:
appArmorProfile:
type: Unconfined
capabilities:
# ...
with the deprecated annotation removed, and this fix propagated to all affected manifest templates in the Kubernetes Agent installation grid — not just datadog-agent-all-features.yaml.
Steps to reproduce the issue
- Download the manifest:
curl -O https://docs.datadoghq.com/resources/yaml/datadog-agent-all-features.yaml - Apply it to a cluster running Kubernetes >= 1.30:
kubectl apply -f datadog-agent-all-features.yaml - Observe the deprecation warning on the
datadogDaemonSet.
Additional environment details (Operating System, Cloud provider, etc)
- Kubernetes version: 1.35.0 (AWS EKS)
- File:
hugo/static/resources/yaml/datadog-agent-all-features.yaml@a979cf533a427c4a6146bd4b6a3da9d28077ac3a
- Dominant language
- JavaScript
- Stars
- 618
- Forks
- 1.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 482
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/documentation
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
DataDog/documentation#39746 · 1 reaction ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DataDog/documentation#38651 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
DataDog/documentation#37078 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DataDog/documentation#36762 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
DataDog/documentation#36300 · 1 comment ·
All issues in DataDog/documentation
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100