Give the permission of listing or watching the persistentvolumeclaims to the ClusterRole

This commit is contained in:
M. Mert Yildiran 2023-04-20 03:01:25 +03:00
parent c342885cae
commit df7d1ac10c
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461
3 changed files with 18 additions and 3 deletions

View File

@ -19,6 +19,7 @@ rules:
- pods - pods
- services - services
- endpoints - endpoints
- persistentvolumeclaims
verbs: verbs:
- list - list
- get - get

View File

@ -575,9 +575,22 @@ func (provider *Provider) BuildClusterRole() *rbac.ClusterRole {
}, },
Rules: []rbac.PolicyRule{ Rules: []rbac.PolicyRule{
{ {
APIGroups: []string{"", "extensions", "apps"}, APIGroups: []string{
Resources: []string{"pods", "services", "endpoints"}, "",
Verbs: []string{"list", "get", "watch"}, "extensions",
"apps",
},
Resources: []string{
"pods",
"services",
"endpoints",
"persistentvolumeclaims",
},
Verbs: []string{
"list",
"get",
"watch",
},
}, },
}, },
} }

View File

@ -19,6 +19,7 @@ rules:
- pods - pods
- services - services
- endpoints - endpoints
- persistentvolumeclaims
verbs: verbs:
- list - list
- get - get