Skip to content

Commit a9f80c7

Browse files
committed
update RBAC rules in e2e aggregator test
Add the "get" and "watch" verbs to the ClusterRole created for the sample apiserver. Without this, the test complains about "Failed to watch..." the resources in question. Strictly speaking the "get" verb doesn't seem to be needed, but this aligns the e2e test with the example at staging/src/k8s.io/sample-apiserver/artifacts/example/rbac.yaml
1 parent fcc35b0 commit a9f80c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/e2e/apimachinery/aggregator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ func TestSampleAPIServer(f *framework.Framework, aggrclient *aggregatorclient.Cl
144144
// role for listing ValidatingWebhookConfiguration/MutatingWebhookConfiguration/Namespaces
145145
ObjectMeta: metav1.ObjectMeta{Name: "sample-apiserver-reader"},
146146
Rules: []rbacv1.PolicyRule{
147-
rbacv1helpers.NewRule("list").Groups("").Resources("namespaces").RuleOrDie(),
148-
rbacv1helpers.NewRule("list").Groups("admissionregistration.k8s.io").Resources("*").RuleOrDie(),
147+
rbacv1helpers.NewRule("get", "list", "watch").Groups("").Resources("namespaces").RuleOrDie(),
148+
rbacv1helpers.NewRule("get", "list", "watch").Groups("admissionregistration.k8s.io").Resources("*").RuleOrDie(),
149149
},
150150
})
151151
framework.ExpectNoError(err, "creating cluster role %s", "sample-apiserver-reader")

0 commit comments

Comments
 (0)