Skip to content

Do not set process-agent AppArmor for NPM fallback#3185

Merged
khewonc merged 1 commit into
mainfrom
tbavelier/fix-process-agent-apparmor
Jun 23, 2026
Merged

Do not set process-agent AppArmor for NPM fallback#3185
khewonc merged 1 commit into
mainfrom
tbavelier/fix-process-agent-apparmor

Conversation

@tbavelier

@tbavelier tbavelier commented Jun 23, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Removes the container.apparmor.security.beta.kubernetes.io/process-agent: unconfined annotation added by the NPM/USM non-direct-send fallback path.

process-agent is still created and configured when CNM/USM direct-send is disabled or unavailable, but only system-probe keeps its existing AppArmor annotation.

Motivation

The process-agent AppArmor annotation was introduced while enabling CNM direct-send by default: #3045. That changed the legacy fallback rendering even though this annotation was not previously emitted and the Helm chart does not add an AppArmor profile for process-agent.

On GKE Autopilot, the extra annotation causes the Datadog daemonset to be rejected by the WorkloadAllowlist because the allowlist does not permit a container-level AppArmor profile for process-agent.

Additional Notes

This is intentionally not an Autopilot-specific workaround. It restores the previous operator behavior for process-agent while keeping the existing system-probe AppArmor behavior unchanged.

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: N/A
  • Cluster Agent: N/A

Describe your test plan

go test ./internal/controller/datadogagent/feature/npm ./internal/controller/datadogagent/feature/usm ./internal/controller/datadogagent/feature/...

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed (see: signing commits)

@tbavelier tbavelier added bug Something isn't working qa/skip-qa labels Jun 23, 2026
@tbavelier
tbavelier marked this pull request as ready for review June 23, 2026 14:03
@tbavelier
tbavelier requested a review from a team June 23, 2026 14:03
@tbavelier
tbavelier requested review from a team as code owners June 23, 2026 14:03
@tbavelier
tbavelier requested review from Janaeq and removed request for a team June 23, 2026 14:03

@Janaeq Janaeq left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tbavelier tbavelier added this to the v1.28.0 milestone Jun 23, 2026
@datadog-prod-us1-5

This comment has been minimized.

@khewonc
khewonc merged commit 9903c3d into main Jun 23, 2026
50 checks passed
@khewonc
khewonc deleted the tbavelier/fix-process-agent-apparmor branch June 23, 2026 17:20
khewonc pushed a commit that referenced this pull request Jun 23, 2026
(cherry picked from commit 9903c3d)

Co-authored-by: Timothée Bavelier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants