Skip to content

fix(appsec): correct envoyproxy RBAC resource typo backend -> backends#3116

Merged
eliottness merged 1 commit into
mainfrom
eliott.bouhana/fix-envoy-backends-rbac-typo
Jun 9, 2026
Merged

fix(appsec): correct envoyproxy RBAC resource typo backend -> backends#3116
eliottness merged 1 commit into
mainfrom
eliott.bouhana/fix-envoy-backends-rbac-typo

Conversation

@eliottness

Copy link
Copy Markdown
Contributor

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

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
@eliottness
eliottness requested a review from a team June 9, 2026 12:46
@eliottness eliottness added bug Something isn't working qa/skip-qa labels Jun 9, 2026
@eliottness
eliottness requested a review from a team as a code owner June 9, 2026 12:46
@codecov-commenter

codecov-commenter commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.48%. Comparing base (34b1fdb) to head (4d7af2a).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3116   +/-   ##
=======================================
  Coverage   43.48%   43.48%           
=======================================
  Files         352      352           
  Lines       30020    30020           
=======================================
  Hits        13053    13053           
  Misses      16095    16095           
  Partials      872      872           
Flag Coverage Δ
unittests 43.48% <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 34b1fdb...4d7af2a. 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 added this to the v1.28.0 milestone Jun 9, 2026
@eliottness
eliottness merged commit 43b0089 into main Jun 9, 2026
84 checks passed
@eliottness
eliottness deleted the eliott.bouhana/fix-envoy-backends-rbac-typo branch June 9, 2026 14:20
tbavelier pushed a commit that referenced this pull request Jun 10, 2026
#3116) (#3121)

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)

Co-authored-by: Eliott B <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants