From 9e80a561eacd15de7659f77ee75db97b7f53b638 Mon Sep 17 00:00:00 2001 From: Arnon Gilboa Date: Mon, 25 Apr 2022 15:50:27 +0300 Subject: [PATCH] [release-v1.43] Expose all CDI CRDs to cluster-readers Manual backport of #2245 Signed-off-by: Arnon Gilboa --- pkg/operator/resources/cluster/rbac.go | 5 +++++ tests/rbac_test.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/pkg/operator/resources/cluster/rbac.go b/pkg/operator/resources/cluster/rbac.go index 09bc842ae1..a5d21ef870 100644 --- a/pkg/operator/resources/cluster/rbac.go +++ b/pkg/operator/resources/cluster/rbac.go @@ -85,7 +85,12 @@ func getViewPolicyRules() []rbacv1.PolicyRule { "cdi.kubevirt.io", }, Resources: []string{ + "cdiconfigs", + "dataimportcrons", + "datasources", "datavolumes", + "objecttransfers", + "storageprofiles", }, Verbs: []string{ "get", diff --git a/tests/rbac_test.go b/tests/rbac_test.go index 600f8123bd..e2ec0dcc0e 100644 --- a/tests/rbac_test.go +++ b/tests/rbac_test.go @@ -255,7 +255,12 @@ var _ = Describe("Aggregated role definition tests", func() { "cdi.kubevirt.io", }, Resources: []string{ + "cdiconfigs", + "dataimportcrons", + "datasources", "datavolumes", + "objecttransfers", + "storageprofiles", }, Verbs: []string{ "get",