Skip to content

[Backport v1.28] Do not set process-agent AppArmor for NPM fallback#3189

Merged
khewonc merged 1 commit into
v1.28from
backport-3185-to-v1.28
Jun 23, 2026
Merged

[Backport v1.28] Do not set process-agent AppArmor for NPM fallback#3189
khewonc merged 1 commit into
v1.28from
backport-3185-to-v1.28

Conversation

@dd-octo-sts

@dd-octo-sts dd-octo-sts Bot commented Jun 23, 2026

Copy link
Copy Markdown

Backport 9903c3d from #3185.


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)

@dd-octo-sts dd-octo-sts Bot added bug Something isn't working qa/skip-qa backport label added by backport action bot label added by backport bot team/cloud-network-monitoring team/universal-service-monitoring labels Jun 23, 2026
@dd-octo-sts
dd-octo-sts Bot requested review from a team as code owners June 23, 2026 17:21
@dd-octo-sts
dd-octo-sts Bot requested a review from jmw51798 June 23, 2026 17:21
@dd-octo-sts dd-octo-sts Bot added this to the v1.28.0 milestone Jun 23, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.33%. Comparing base (9ca69f3) to head (0dc2d46).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##            v1.28    #3189      +/-   ##
==========================================
- Coverage   43.34%   43.33%   -0.01%     
==========================================
  Files         352      352              
  Lines       30099    30095       -4     
==========================================
- Hits        13045    13041       -4     
  Misses      16181    16181              
  Partials      873      873              
Flag Coverage Δ
unittests 43.33% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...nal/controller/datadogagent/feature/npm/feature.go 88.23% <ø> (-0.23%) ⬇️
...nal/controller/datadogagent/feature/usm/feature.go 84.00% <ø> (-0.32%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ca69f3...0dc2d46. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jun 23, 2026

Copy link
Copy Markdown

Code Coverage

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 43.61% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0dc2d46 | Docs | Datadog PR Page | Give us feedback!

@khewonc
khewonc merged commit 7dfe2e5 into v1.28 Jun 23, 2026
68 checks passed
@khewonc
khewonc deleted the backport-3185-to-v1.28 branch June 23, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport label added by backport action bot label added by backport bot bug Something isn't working qa/skip-qa team/cloud-network-monitoring team/universal-service-monitoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants