[Backport v1.28] fix(appsec): correct envoyproxy RBAC resource typo backend -> backends#3121
Merged
Merged
Conversation
#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)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
tbavelier
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:rbacmarker forgateway.envoyproxy.iointernal/controller/datadogagent/feature/appsec/rbac.go— the appsec runtimePolicyRuleconfig/rbac/role.yaml— regenerated viamake manifestsMotivation
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 isbackends). As a result the granted permission never matched the real CRD.Additional Notes
config/rbac/role.yamlwas regenerated withmake manifests(controller-gen v0.17.3); the only resulting change isbackend->backends.Minimum Agent Versions
Not applicable.
Describe your test plan
make manifestsproduces only thebackend->backendschange inconfig/rbac/role.yaml.go build ./internal/controller/...succeeds.go test ./internal/controller/datadogagent/feature/appsec/...passes.Checklist
bugqa/skip-qalabel