Skip to content

Commit

Permalink
add 'get' permission for the CRD itself to the created Role
Browse files Browse the repository at this point in the history
  • Loading branch information
alecmerdler committed Nov 7, 2018
1 parent 6c02a7f commit 8a9c98d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/controller/registry/resolver/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ func NewStepResourcesFromCRD(crd *v1beta1.CustomResourceDefinition) ([]v1alpha1.
"rbac.authorization.k8s.io/aggregate-to-view": "true",
},
},
Rules: []rbacv1.PolicyRule{{Verbs: []string{"get", "list", "watch"}, APIGroups: []string{crd.Spec.Group}, Resources: []string{crd.Spec.Names.Plural}}},
Rules: []rbacv1.PolicyRule{
{Verbs: []string{"get", "list", "watch"}, APIGroups: []string{crd.Spec.Group}, Resources: []string{crd.Spec.Names.Plural}},
{Verbs: []string{"get", "watch"}, APIGroups: []string{v1beta1.GroupName}, Resources: []string{crd.GetName()}},
},
}
viewRoleStep, err := NewStepResourceFromObject(viewRole, viewRole.GetName())
if err != nil {
Expand Down

0 comments on commit 8a9c98d

Please sign in to comment.