Remove unnecessary pods delete permission from ClusterRole

The descheduler ClusterRole granted both pods:delete and
pods/eviction:create. Eviction goes through the eviction subresource
(PolicyV1().Evictions().Evict, requiring pods/eviction:create), and there
are no direct pod Delete calls anywhere in the codebase, so the
pods:delete verb is unused. Drop it to follow least privilege.

Signed-off-by: Aman Raj <aman.yug@gmail.com>
This commit is contained in:
Aman Raj
2026-06-27 02:26:45 +05:30
committed by yugstar
parent 86183b15a2
commit 341aba2723
2 changed files with 2 additions and 2 deletions
@@ -17,7 +17,7 @@ rules:
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list", "delete"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods/eviction"]
verbs: ["create"]
+1 -1
View File
@@ -15,7 +15,7 @@ rules:
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list", "delete"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods/eviction"]
verbs: ["create"]