Skip to content

Commit

Permalink
Attemp Remove _member_ Role
Browse files Browse the repository at this point in the history
This is a legacy thing apparently, and must get covered by either
`member` or be implicit.  However, life.  Seems our provider requires it
for now, so just use an explicit list if provided to remove a TODO.
  • Loading branch information
spjmurray committed Apr 22, 2024
1 parent 8a7d121 commit 698a4dc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/providers/openstack/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,15 @@ func roleNameToID(roles []roles.Role, name string) (string, error) {
return "", fmt.Errorf("%w: role %s", ErrResourceNotFound, name)
}

// TODO: make this configurable, this is just a default.
// getRequiredRoles returns the roles required for a user to create, manage and delete
// a cluster.
func (p *Provider) getRequiredRoles() []string {
if p.region.Spec.Openstack.Identity != nil && p.region.Spec.Openstack.Identity.ClusterRoles != nil {
return p.region.Spec.Openstack.Identity.ClusterRoles
}

// TODO: _member_ shouldn't be necessary, delete me when we get a hsndle on it.
// This is quired by Octavia to list providers and load balancers at the very least.
defaultRoles := []string{
"_member_",
"member",
Expand Down

0 comments on commit 698a4dc

Please sign in to comment.