-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Use cluster role aggregation for service catalog RBAC #18251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use cluster role aggregation for service catalog RBAC #18251
Conversation
/hold SC stuff does not go in bootstrap. @jboyd01 ping me on IRC, I will explain further. |
return []rbac.ClusterRole{ | ||
{ | ||
ObjectMeta: v1.ObjectMeta{ | ||
Name: bootstrappolicy.AdminRoleName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR should be a 6 line change delta where you add the appropriate label to each cluster role and give each cluster role a unique name. For example:
{
ObjectMeta: v1.ObjectMeta{
Name: "system:openshift:service-catalog:aggregate-to-admin",
Labels: map[string]string{"rbac.authorization.k8s.io/aggregate-to-admin": "true"},
},
...
}
fb568b6
to
0521c2d
Compare
@@ -39,18 +38,7 @@ func (h *Helper) InstallServiceCatalog(f *clientcmd.Factory, configDir, publicMa | |||
return err | |||
} | |||
|
|||
for _, role := range GetServiceCatalogRBACDelta() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jboyd01 leave this as-is (there should be no changes to this file other than the GetServiceCatalogRBACDelta
to GetServiceCatalogClusterRoles
name change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, finally got it. Tests look good.
0521c2d
to
47f3286
Compare
return errors.NewError("could not reconcile service catalog cluster role %s", role.Name).WithCause(err) | ||
} | ||
for _, role := range GetServiceCatalogClusterRoles() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: unnecessary newline
/hold cancel LGTM though you need to run go fmt. |
47f3286
to
ed68d3a
Compare
applied go fmt |
/test service-catalog |
/test gcp |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enj, jboyd01 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 18191, 18264, 18235, 18251, 18271). |
Thanks for the fix, @jboyd01 |
fixes https://bugzilla.redhat.com/show_bug.cgi?id=1535639
follow on from #17976