-
Notifications
You must be signed in to change notification settings - Fork 4.8k
SDN controller requires access to watch resources #14968
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -206,15 +206,13 @@ func init() { | |
| ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + InfraSDNControllerServiceAccountName}, | ||
| Rules: []rbac.PolicyRule{ | ||
| rbac.NewRule("get", "create", "update").Groups(networkGroup, legacyNetworkGroup).Resources("clusternetworks").RuleOrDie(), | ||
| rbac.NewRule("get", "list").Groups(networkGroup, legacyNetworkGroup).Resources("egressnetworkpolicies").RuleOrDie(), | ||
| rbac.NewRule("get", "list", "create", "delete").Groups(networkGroup, legacyNetworkGroup).Resources("hostsubnets").RuleOrDie(), | ||
| rbac.NewRule("get", "list", "create", "update", "delete").Groups(networkGroup, legacyNetworkGroup).Resources("netnamespaces").RuleOrDie(), | ||
| rbac.NewRule("get", "list", "watch", "create", "delete").Groups(networkGroup, legacyNetworkGroup).Resources("hostsubnets").RuleOrDie(), | ||
| rbac.NewRule("get", "list", "watch", "create", "update", "delete").Groups(networkGroup, legacyNetworkGroup).Resources("netnamespaces").RuleOrDie(), | ||
| rbac.NewRule("get", "list").Groups(kapiGroup).Resources("pods").RuleOrDie(), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW it doesn't currently need "get", though it does use "list" (at startup, to make sure that all running pods are inside the current clusterNetworkCIDR, if clusterNetworkCIDR has changed).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hrm, can probably leave it. "get"/"list"/"watch" are so closely coupled that we probably should have just done a placeholder |
||
| rbac.NewRule("list").Groups(kapiGroup).Resources("services").RuleOrDie(), | ||
| rbac.NewRule("list").Groups(kapiGroup).Resources("namespaces").RuleOrDie(), | ||
| rbac.NewRule("get").Groups(kapiGroup).Resources("nodes").RuleOrDie(), | ||
| rbac.NewRule("get", "list", "watch").Groups(kapiGroup).Resources("services").RuleOrDie(), | ||
| rbac.NewRule("get", "list", "watch").Groups(kapiGroup).Resources("namespaces").RuleOrDie(), | ||
| rbac.NewRule("get", "list", "watch").Groups(kapiGroup).Resources("nodes").RuleOrDie(), | ||
| rbac.NewRule("update").Groups(kapiGroup).Resources("nodes/status").RuleOrDie(), | ||
| rbac.NewRule("list").Groups(extensionsGroup).Resources("networkPolicies").RuleOrDie(), | ||
|
|
||
| eventsRule(), | ||
| }, | ||
|
|
||
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 applies to the SDN master but not the nodes, correct?
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.
Correct