From bd6b58afab0b14f0e8c7c81f73b7180877dbadb7 Mon Sep 17 00:00:00 2001 From: Arnon Gilboa Date: Wed, 27 Apr 2022 02:38:10 +0300 Subject: [PATCH] [release-v1.43] Expose all CDI CRDs to cluster-readers (#2246) 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",