Skip to content

[CONTP-1363] feat(rbac): Add EndpointSlices read RBAC to clsuter agent#2705

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomainfrom
mathew.estafanous/dca-add-rbac-permissions
Mar 5, 2026
Merged

[CONTP-1363] feat(rbac): Add EndpointSlices read RBAC to clsuter agent#2705
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomainfrom
mathew.estafanous/dca-add-rbac-permissions

Conversation

@Mathew-Estafanous
Copy link
Contributor

@Mathew-Estafanous Mathew-Estafanous commented Mar 5, 2026

What does this PR do?

Adds discovery.k8s.io/endpointslices RBAC permissions to DCA with get/list/watch permissions.

Motivation

As part of the Agent migration to endpointslices, the DCA needs RBAC permissions to read the resource group. The operator doesn't currently provide these permissions OOTB.

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

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

  • Agent: v7.77.x
  • Cluster Agent: v7.77.x

Describe your test plan

  1. Deploy custom operator.
  2. Deploy default DatadogAgent CRD with minimal configurations.
  3. Cluster role for DCA has discovery.k8s.io/endpointslices get/list/watch permissions.
image

image\

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)

@Mathew-Estafanous Mathew-Estafanous added this to the v1.25.0 milestone Mar 5, 2026
@Mathew-Estafanous Mathew-Estafanous self-assigned this Mar 5, 2026
@Mathew-Estafanous Mathew-Estafanous added the enhancement New feature or request label Mar 5, 2026
@Mathew-Estafanous Mathew-Estafanous marked this pull request as ready for review March 5, 2026 19:56
@Mathew-Estafanous Mathew-Estafanous requested a review from a team March 5, 2026 19:56
@Mathew-Estafanous Mathew-Estafanous requested a review from a team as a code owner March 5, 2026 19:56
@Mathew-Estafanous Mathew-Estafanous changed the title feat(rbac): Add EndpointSlices read RBAC to clsuter agent [CONTP-1363] feat(rbac): Add EndpointSlices read RBAC to clsuter agent Mar 5, 2026
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.80%. Comparing base (232e661) to head (6740b9d).

Files with missing lines Patch % Lines
...roller/datadogagent/component/clusteragent/rbac.go 0.00% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2705      +/-   ##
==========================================
- Coverage   38.81%   38.80%   -0.02%     
==========================================
  Files         307      307              
  Lines       26610    26618       +8     
==========================================
  Hits        10329    10329              
- Misses      15501    15509       +8     
  Partials      780      780              
Flag Coverage Δ
unittests 38.80% <0.00%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
internal/controller/datadogagent_controller.go 66.66% <ø> (ø)
...roller/datadogagent/component/clusteragent/rbac.go 23.07% <0.00%> (-1.70%) ⬇️

Continue to review full report in Codecov by Sentry.

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

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

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit 5f75d74 into main Mar 5, 2026
59 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the mathew.estafanous/dca-add-rbac-permissions branch March 5, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants