Bug 1328278

Summary: [RFE] Ability to assign a PVC to a PV of your choosing with ease.
Product: OpenShift Container Platform Reporter: Ryan Howe <rhowe>
Component: StorageAssignee: Steve Watt <swatt>
Status: CLOSED DUPLICATE QA Contact: Jianwei Hou <jhou>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: aos-bugs, jkaur, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-22 18:39:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ryan Howe 2016-04-18 22:14:04 UTC
Description of problem:

  - At this time we require many steps to ensure a PVC is assigned to specific PV.  We are requesting that a PVC can be created with an identifier that attaches it to a specific PV. 


Version-Release number of selected component (if applicable):
3.1.1.6

Additional info:

Upstream ISSUE: 
https://github.com/kubernetes/kubernetes/issues/23615


Step 1  - Create a PVC 

Step 2  - Take note of the uid,name and namespace of the newly created PVC. 

Step 3  - Create or Edit a PV adding  pv.Spec.ClaimRef 

 ~~
 apiVersion: v1
 kind: PersistentVolume
  spec  
    claimRef:
      name: my-pvc
      namespace: default
      uid: 36b6bc2d-05a9-11e6-8fcc-fa163eec34c3
 ~~

Step 4 - Edit the pvc.Spec.VolumeName to reference the PV. After doing this you will see the PVC bound to the PV 

Step 5 - Scrub the data from pv.Spec.ClaimRef of the first PV that the PVC originally bound to.

Comment 1 Bradley Childs 2016-04-20 14:52:05 UTC
Cross linked with the trello card: https://trello.com/c/PUjOivca/144-rfe-ability-to-assign-a-pvc-to-a-pv-of-your-choosing-with-ease