Skip to content

Commit

Permalink
Expose all CDI CRDs to cluster-readers
Browse files Browse the repository at this point in the history
Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
  • Loading branch information
arnongilboa committed Apr 24, 2022
1 parent d7ae7d4 commit e091588
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/cdi-cloner/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ go_library(
visibility = ["//visibility:private"],
deps = [
"//pkg/common:go_default_library",
"//pkg/monitoring:go_default_library",
"//pkg/util:go_default_library",
"//pkg/util/prometheus:go_default_library",
"//vendor/github.com/golang/snappy:go_default_library",
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ go_library(
deps = [
"//pkg/common:go_default_library",
"//pkg/feature-gates:go_default_library",
"//pkg/monitoring:go_default_library",
"//pkg/operator:go_default_library",
"//pkg/storagecapabilities:go_default_library",
"//pkg/token:go_default_library",
Expand Down
1 change: 1 addition & 0 deletions pkg/image/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/common:go_default_library",
"//pkg/monitoring:go_default_library",
"//pkg/system:go_default_library",
"//pkg/util:go_default_library",
"//vendor/github.com/docker/go-units:go_default_library",
Expand Down
1 change: 1 addition & 0 deletions pkg/importer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ go_library(
deps = [
"//pkg/common:go_default_library",
"//pkg/image:go_default_library",
"//pkg/monitoring:go_default_library",
"//pkg/util:go_default_library",
"//pkg/util/prometheus:go_default_library",
"//staging/src/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/controller/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ go_library(
"//pkg/apiserver:go_default_library",
"//pkg/common:go_default_library",
"//pkg/controller:go_default_library",
"//pkg/monitoring:go_default_library",
"//pkg/operator:go_default_library",
"//pkg/operator/resources/cert:go_default_library",
"//pkg/operator/resources/cluster:go_default_library",
Expand Down
5 changes: 5 additions & 0 deletions pkg/operator/resources/cluster/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ func getViewPolicyRules() []rbacv1.PolicyRule {
"cdi.kubevirt.io",
},
Resources: []string{
"cdiconfigs",
"dataimportcrons",
"datasources",
"datavolumes",
"objecttransfers",
"storageprofiles",
},
Verbs: []string{
"get",
Expand Down
5 changes: 5 additions & 0 deletions tests/rbac_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tools/metricsdocs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go_library(
srcs = ["metricsdocs.go"],
importpath = "kubevirt.io/containerized-data-importer/tools/metricsdocs",
visibility = ["//visibility:private"],
deps = ["//pkg/operator/controller:go_default_library"],
deps = ["//pkg/monitoring:go_default_library"],
)

go_binary(
Expand Down

0 comments on commit e091588

Please sign in to comment.