Skip to content

Commit ba37149

Browse files
Fix e2e test RBAC: add bind/escalate verbs
Scoped ServiceAccount clients need `bind` and `escalate` verbs to create ClusterRoleBindings. The admin client previously used bypassed this RBAC requirement. The documentation (docs/concepts/permission-model.md) already specifies that ServiceAccounts need `bind` and `escalate` verbs for RBAC resources to install extensions with their own RBAC. The e2e test template was missing these verbs, causing tests to fail when using scoped ServiceAccount clients (which properly enforce Kubernetes RBAC) instead of the admin client.
1 parent 2a2d85c commit ba37149

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/e2e/steps/testdata/rbac-template.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ rules:
5050
- roles
5151
- clusterrolebindings
5252
- rolebindings
53-
verbs: [ update, create, list, watch, get, delete, patch ]
53+
# The bind and escalate verbs allow the ServiceAccount to create role bindings
54+
# for roles it doesn't have and grant permissions beyond its own. This is required
55+
# because extension bundles contain their own RBAC that must be created.
56+
# See docs/concepts/permission-model.md for details on these requirements.
57+
verbs: [ update, create, list, watch, get, delete, patch, bind, escalate ]
5458
- apiGroups: ["coordination.k8s.io"]
5559
resources: ["leases"]
5660
verbs: [ update, create, list, watch, get, delete, patch ]

0 commit comments

Comments
 (0)