Skip to content

Added PVController service account - #5465

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
markturansky:recycler_account
Nov 4, 2015
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
markturansky:recycler_account

Conversation

@markturansky

Copy link
Copy Markdown
Member

Resolves #3286

@liggitt @deads2k Please let me know what else needs to happen for this account. I'm not familiar with this functionality.

@markturansky

Copy link
Copy Markdown
Member Author

@pweil-

Copy link
Copy Markdown
Contributor

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 (see JobControllerRoleName definition as an example). Include all API calls, verbs and objects the persistent volume controller's client will need to be permitted to do.

@liggitt

liggitt commented Oct 28, 2015

Copy link
Copy Markdown
Contributor

Update GetBootstrapSecurityContextConstraints to add your controller to a SCC that has AllowHostDirVolumePlugin: true? @pweil-, do you have a handle on the work to add more granular SCCs, and a command to reconcile existing SCCs with expected bootstrap SCCs on upgrade?

@pweil-

pweil- commented Oct 28, 2015

Copy link
Copy Markdown

I expect to have the new SCCs in by the end of the week, tomorrow if I can finish babysitting my other PR shortly. I have not had a chance to look at a reconcile command yet.

@markturansky as @liggitt suggests we'll want to add your new SA to a HostMount enabled SCC that is not the privileged SCC. We can change the method signature to provide a toAddGroups and toAddUsers that are maps of sccName -> identity rather than expand the existing signature.

@markturansky

Copy link
Copy Markdown
Member Author

@liggitt @pweil- I added the role in policy.go, but I don't understand how to add the controller to an SCC. It wasn't obvious to me looking at securitycontextrestraints.go and I'm not sure where/how to add it.

@pweil- pweil- mentioned this pull request Oct 29, 2015
@liggitt liggitt added this to the 1.1.0 milestone Oct 31, 2015
@smarterclayton smarterclayton added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2015
@markturansky
markturansky force-pushed the recycler_account branch 2 times, most recently from 715f1d2 to 98171a4 Compare November 3, 2015 18:00
@pweil-

pweil- commented Nov 3, 2015

Copy link
Copy Markdown

should probably include a test that ensures this works with the defined OpenShift policy

@smarterclayton

Copy link
Copy Markdown
Contributor

Let's try to get the test in tomorrow morning

@liggitt liggitt modified the milestone: 1.1.0 Nov 4, 2015
Comment thread pkg/cmd/server/origin/ensure.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

comment is wrong. You're adding to the HostMount SCC

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

comment fixed

@deads2k

deads2k commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

Just nit. It could use a squash and a test. Then lgtm.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

when would the controller create a PV?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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.

@markturansky

Copy link
Copy Markdown
Member Author

Feedback addressed and squashed. Will get to the e2e test promptly.

@liggitt liggitt self-assigned this Nov 4, 2015
@liggitt

liggitt commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

nit at #5465 (comment), then LGTM

@liggitt

liggitt commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

LGTM, [test]

@liggitt liggitt added the lgtm Indicates that a PR is ready to be merged. label Nov 4, 2015

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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]
wrote:

In pkg/cmd/server/bootstrappolicy/policy.go
#5465 (comment):

  •               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"),
    
  •               Resources: sets.NewString("pods"),
    
  •           },
    
  •           // PersistentVolumeRecycler.reclaimVolume() -> handleRecycle()
    
  •           {
    
  •               Verbs:     sets.NewString("get", "create", "delete"),
    

per the other comment, added "get" here, which follows where "get" lives
in the other defined policies.

—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/5465/files#r43932540.

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 1e93934

@openshift-bot

Copy link
Copy Markdown
Contributor

@smarterclayton

Copy link
Copy Markdown
Contributor

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6898/) (Image: devenv-rhel7_2638)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 1e93934

openshift-bot pushed a commit that referenced this pull request Nov 4, 2015
@openshift-bot
openshift-bot merged commit cb9efc2 into openshift:master Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants