Skip to content

Commit

Permalink
Merge pull request #42 from kubevirt-bot/cherry-pick-40-to-release-v0.2
Browse files Browse the repository at this point in the history
[release-v0.2] Add list/get permission on sc.
  • Loading branch information
awels authored Dec 5, 2019
2 parents 611d6c4 + 5462e19 commit a7e12dd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/controller/hostpathprovisioner/contoller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,18 @@ func verifyCreateClusterRole(cl client.Client) {
"update",
},
},
{
APIGroups: []string{
"storage.k8s.io",
},
Resources: []string{
"storageclasses",
},
Verbs: []string{
"get",
"list",
},
},
{
APIGroups: []string{
"",
Expand Down
12 changes: 12 additions & 0 deletions pkg/controller/hostpathprovisioner/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@ func createClusterRoleObject(name string) *rbacv1.ClusterRole {
"update",
},
},
{
APIGroups: []string{
"storage.k8s.io",
},
Resources: []string{
"storageclasses",
},
Verbs: []string{
"get",
"list",
},
},
{
APIGroups: []string{
"",
Expand Down
12 changes: 12 additions & 0 deletions tools/csv-generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,18 @@ func getOperatorClusterRules() *[]rbacv1.PolicyRule {
"update",
},
},
{
APIGroups: []string{
"storage.k8s.io",
},
Resources: []string{
"storageclasses",
},
Verbs: []string{
"get",
"list",
},
},
{
APIGroups: []string{
"",
Expand Down

0 comments on commit a7e12dd

Please sign in to comment.