Skip to content

Set CSI driver RBAC in DCA only when enabled (#3270)#3273

Merged
levan-m merged 1 commit into
v1.29from
backport-3270-to-v1.29
Jul 17, 2026
Merged

Set CSI driver RBAC in DCA only when enabled (#3270)#3273
levan-m merged 1 commit into
v1.29from
backport-3270-to-v1.29

Conversation

@levan-m

@levan-m levan-m commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

(cherry picked from commit df5dfe5)

#3270

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

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: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

Write there any instructions and details you may have to test your PR.

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)

@levan-m levan-m added this to the v1.29.0 milestone Jul 17, 2026
@levan-m
levan-m requested a review from a team as a code owner July 17, 2026 14:30
@levan-m levan-m added enhancement New feature or request backport label added by backport action labels Jul 17, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0f2f1d6f3e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

rbac.WatchVerb,
}

if f.csiDriverEnabled {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve DCA RBAC for externally managed CSI drivers

When spec.global.csi.enabled=true but --datadogCSIDriverEnabled=false, this condition removes the Cluster Agent's csidrivers list/watch/get permissions even though this is an explicitly supported external-driver configuration (internal/controller/datadogagent/ddcsi.go:46-48) and DD_CSI_ENABLED=true is still passed to the Cluster Agent (internal/controller/datadogagent/global/global.go:232-237). Consequently, the admission controller cannot inspect the externally installed k8s.csi.datadoghq.com object for CSI-aware injection; the RBAC decision must account for CSI being enabled in the DDA independently of whether the operator manages the driver.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1

Copy link
Copy Markdown

Code Coverage

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: no data available (threshold: 80.00%)

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: No data available
Overall Coverage: 46.60% (+0.01%)

Useful? React with 👍 / 👎

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

@levan-m
levan-m merged commit b33a770 into v1.29 Jul 17, 2026
46 of 47 checks passed
@levan-m
levan-m deleted the backport-3270-to-v1.29 branch July 17, 2026 15:28
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 enhancement New feature or request team/container-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants