Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/cmd/server/bootstrappolicy/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const (
MasterRoleName = "system:master"
NodeRoleName = "system:node"
NodeProxierRoleName = "system:node-proxier"
SDNIntegratedRouterRole = "system:sdn-integrated-router"
SDNReaderRoleName = "system:sdn-reader"
SDNManagerRoleName = "system:sdn-manager"
OAuthTokenDeleterRoleName = "system:oauth-token-deleter"
Expand Down
8 changes: 8 additions & 0 deletions pkg/cmd/server/bootstrappolicy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,14 @@ func GetBootstrapClusterRoles() []authorizationapi.ClusterRole {
authorizationapi.NewRule("update").Groups(routeGroup).Resources("routes/status").RuleOrDie(),
},
},
{
ObjectMeta: kapi.ObjectMeta{
Name: SDNIntegratedRouterRole,
},
Rules: []authorizationapi.PolicyRule{
authorizationapi.NewRule("list", "watch").Groups(kapiGroup).Resources("nodes").RuleOrDie(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you only need this one. A user can have multiple roles, so this is what you need in addition to the existing router role.

},
},
{
ObjectMeta: kapi.ObjectMeta{
Name: RegistryRoleName,
Expand Down