Repository navigation
Added PVController service account #5465
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 |
|---|---|---|
|
|
@@ -416,6 +416,58 @@ func GetBootstrapClusterRoles() []authorizationapi.ClusterRole { | |
| }, | ||
| }, | ||
| }, | ||
| { | ||
| ObjectMeta: kapi.ObjectMeta{ | ||
| Name: PersistentVolumeControllerRoleName, | ||
| }, | ||
| Rules: []authorizationapi.PolicyRule{ | ||
| // PersistentVolumeBinder.volumeController.ListWatch | ||
| { | ||
| Verbs: sets.NewString("list", "watch"), | ||
| Resources: sets.NewString("persistentvolumes"), | ||
| }, | ||
| // PersistentVolumeBinder.syncVolume() | ||
| { | ||
| Verbs: sets.NewString("get", "update", "create", "delete"), | ||
|
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. when would the controller create a PV?
Member
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. The provisioning pieces (which were declined for 3.1) will require Create and Delete of PVs.
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. does deleting a PV come from the recycler? if so, move that to the recycler section
Member
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. I arranged them this way just to avoid duplication. Both the binder and recycler require Get/Update. Recycler requires Create/Delete. They are all in one here, since it's the same account. |
||
| Resources: sets.NewString("persistentvolumes"), | ||
| }, | ||
| // PersistentVolumeBinder.syncVolume() | ||
| { | ||
| Verbs: sets.NewString("update"), | ||
| Resources: sets.NewString("persistentvolumes/status"), | ||
| }, | ||
| // PersistentVolumeBinder.claimController.ListWatch | ||
| { | ||
| Verbs: sets.NewString("list", "watch"), | ||
| Resources: sets.NewString("persistentvolumeclaims"), | ||
| }, | ||
| // PersistentVolumeBinder.syncClaim() | ||
| { | ||
| Verbs: sets.NewString("get", "update"), | ||
| Resources: sets.NewString("persistentvolumeclaims"), | ||
| }, | ||
| // PersistentVolumeBinder.syncClaim() | ||
| { | ||
| Verbs: sets.NewString("update"), | ||
| Resources: sets.NewString("persistentvolumeclaims/status"), | ||
| }, | ||
| // PersistentVolumeRecycler.reclaimVolume() -> handleRecycle() | ||
| { | ||
| Verbs: sets.NewString("list", "watch"), | ||
|
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. recyclerClient has GetPod, but not ListPods
Member
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. The recycler makes a Lister/Watcher to watch its recycling pod until completion.
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. add "get" here, just because the recyclerClient potentially makes use of it
Member
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. added |
||
| Resources: sets.NewString("pods"), | ||
| }, | ||
| // PersistentVolumeRecycler.reclaimVolume() -> handleRecycle() | ||
| { | ||
| Verbs: sets.NewString("get", "create", "delete"), | ||
|
Member
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. per the other comment, added "get" here, which follows where "get" lives in the other defined policies.
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. [merge] On Wed, Nov 4, 2015 at 3:10 PM, Mark Turansky [email protected]
|
||
| Resources: sets.NewString("pods"), | ||
| }, | ||
| // PersistentVolumeRecycler.reclaimVolume() -> handleRecycle() | ||
| { | ||
| Verbs: sets.NewString("create", "update", "patch"), | ||
| Resources: sets.NewString("events"), | ||
| }, | ||
| }, | ||
| }, | ||
| { | ||
| ObjectMeta: kapi.ObjectMeta{ | ||
| Name: HPAControllerRoleName, | ||
|
|
||
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.
you need to define this role in
bootstrappolicy/policy.go(seeJobControllerRoleNamedefinition as an example). Include all API calls, verbs and objects the persistent volume controller's client will need to be permitted to do.