Skip to content

[Backport v1.28] fix(appsec): correct envoyproxy RBAC resource typo backend -> backends#3121

Merged
tbavelier merged 1 commit into
v1.28from
backport-3116-to-v1.28
Jun 10, 2026
Merged

[Backport v1.28] fix(appsec): correct envoyproxy RBAC resource typo backend -> backends#3121
tbavelier merged 1 commit into
v1.28from
backport-3116-to-v1.28

Conversation

@dd-octo-sts

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

Copy link
Copy Markdown

Backport 43b0089 from #3116.


What does this PR do?

Fixes a typo in the Envoy Gateway RBAC resource name: backend -> backends (the Envoy Gateway API resource is plural).

The fix touches all three places the name appears:

  • internal/controller/datadogagent_controller.go — the +kubebuilder:rbac marker for gateway.envoyproxy.io
  • internal/controller/datadogagent/feature/appsec/rbac.go — the appsec runtime PolicyRule
  • config/rbac/role.yaml — regenerated via make manifests

Motivation

The operator's AppSec feature requested RBAC permissions for a resource named backend, which does not exist in the Envoy Gateway API (the correct resource is backends). As a result the granted permission never matched the real CRD.

Additional Notes

  • config/rbac/role.yaml was regenerated with make manifests (controller-gen v0.17.3); the only resulting change is backend -> backends.
  • No API type changes, so no CRD regeneration was needed.

Minimum Agent Versions

Not applicable.

Describe your test plan

  • make manifests produces only the backend -> backends change in config/rbac/role.yaml.
  • go build ./internal/controller/... succeeds.
  • go test ./internal/controller/datadogagent/feature/appsec/... passes.

Checklist

  • PR has at least one valid label: bug
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed

#3116)

The Envoy Gateway API resource is plural `backends`. The kubebuilder
marker, the appsec runtime RBAC rule, and the generated ClusterRole all
referenced the singular `backend`, so the operator requested permissions
for a non-existent resource.

Fixed the kubebuilder marker and the appsec PolicyRule, then regenerated
config/rbac/role.yaml via `make manifests`.

Confidence: high
Scope-risk: narrow
(cherry picked from commit 43b0089)
@dd-octo-sts dd-octo-sts Bot added bug Something isn't working qa/skip-qa mergequeue-status: done backport label added by backport action bot label added by backport bot labels Jun 10, 2026
@dd-octo-sts
dd-octo-sts Bot requested a review from a team as a code owner June 10, 2026 06:53
@dd-octo-sts
dd-octo-sts Bot requested a review from a team as a code owner June 10, 2026 06:53
@dd-octo-sts dd-octo-sts Bot added this to the v1.28.0 milestone Jun 10, 2026
@codecov-commenter

codecov-commenter commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.44%. Comparing base (4a8f342) to head (553ce8f).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            v1.28    #3121   +/-   ##
=======================================
  Coverage   43.44%   43.44%           
=======================================
  Files         350      350           
  Lines       29994    29994           
=======================================
  Hits        13031    13031           
  Misses      16091    16091           
  Partials      872      872           
Flag Coverage Δ
unittests 43.44% <100.00%> (ø)

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

Files with missing lines Coverage Δ
...nal/controller/datadogagent/feature/appsec/rbac.go 100.00% <100.00%> (ø)
internal/controller/datadogagent_controller.go 62.12% <ø> (ø)

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 4a8f342...553ce8f. Read the comment docs.

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

@datadog-datadog-prod-us1-2

This comment has been minimized.

@tbavelier
tbavelier merged commit 1a48339 into v1.28 Jun 10, 2026
74 checks passed
@tbavelier
tbavelier deleted the backport-3116-to-v1.28 branch June 10, 2026 08:09
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 mergequeue-status: done qa/skip-qa team/asm-go team/container-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants