Skip to content

Commit 7ea2b48

Browse files
xiumozhanclaude
andauthored
Add HEP-related RBAC for policy recommendation (#4594)
The host endpoint policy recommendation engine needs access to stagedglobalnetworkpolicies, globalnetworkpolicies, and hostendpoints resources (including their tier-scoped variants) to create and manage recommended policies for non-cluster hosts. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 22ba3df commit 7ea2b48

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

pkg/render/policyrecommendation.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@ func (pr *policyRecommendationComponent) clusterRole() client.Object {
155155
"tier.stagednetworkpolicies",
156156
"networkpolicies",
157157
"tier.networkpolicies",
158+
"stagedglobalnetworkpolicies",
159+
"tier.stagedglobalnetworkpolicies",
160+
"globalnetworkpolicies",
161+
"tier.globalnetworkpolicies",
158162
"globalnetworksets",
163+
"hostendpoints",
159164
},
160165
Verbs: []string{"create", "delete", "get", "list", "patch", "update", "watch"},
161166
},

pkg/render/policyrecommendation_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ var _ = Describe("Policy recommendation rendering tests", func() {
151151
"tier.stagednetworkpolicies",
152152
"networkpolicies",
153153
"tier.networkpolicies",
154+
"stagedglobalnetworkpolicies",
155+
"tier.stagedglobalnetworkpolicies",
156+
"globalnetworkpolicies",
157+
"tier.globalnetworkpolicies",
154158
"globalnetworksets",
159+
"hostendpoints",
155160
},
156161
Verbs: []string{"create", "delete", "get", "list", "patch", "update", "watch"},
157162
},

0 commit comments

Comments
 (0)