• Kubernetes Submit Queue's avatar
    Merge pull request #65730 from ddebroy/ebs-affinity1 · 22d0ef2a
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 65730, 66615, 66684, 66519, 66510). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Add DynamicProvisioningScheduling support for EBS
    
    **What this PR does / why we need it**:
    
    This PR adds support for the DynamicProvisioningScheduling feature in EBS. With this in place, if VolumeBindingMode: WaitForFirstConsumer is specified in a EBS storageclass and DynamicProvisioningScheduling is enabled, EBS provisioner will use the selected node's LabelZoneFailureDomain as the zone to provision the EBS volume in.
    
    **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
    Fixes #
    
    **Special notes for your reviewer**:
    Related to #63232
    
    Sample `describe pv` output with NodeAffinity populated:
    
    ```
    ~$ kubectl describe pv pvc-f9d2138b-7e3e-11e8-a4ea-064124617820
    Name:              pvc-f9d2138b-7e3e-11e8-a4ea-064124617820
    Labels:            failure-domain.beta.kubernetes.io/region=us-west-2
                       failure-domain.beta.kubernetes.io/zone=us-west-2a
    Annotations:       kubernetes.io/createdby=aws-ebs-dynamic-provisioner
                       pv.kubernetes.io/bound-by-controller=yes
                       pv.kubernetes.io/provisioned-by=kubernetes.io/aws-ebs
    Finalizers:        [kubernetes.io/pv-protection]
    StorageClass:      slow3
    Status:            Bound
    Claim:             default/pvc3
    Reclaim Policy:    Delete
    Access Modes:      RWO
    Capacity:          6Gi
    Node Affinity:     
      Required Terms:  
        Term 0:        failure-domain.beta.kubernetes.io/zone in [us-west-2a]
                       failure-domain.beta.kubernetes.io/region in [us-west-2]
    Message:           
    Source:
        Type:       AWSElasticBlockStore (a Persistent Disk resource in AWS)
        VolumeID:   aws://us-west-2a/vol-0fc1cdae7d10860f6
        FSType:     ext4
        Partition:  0
        ReadOnly:   false
    Events:         <none>
    ```
    
    **Release note**:
    ```release-note
    none
    ```
    
    /sig storage
    /assign @msau42 @jsafrane
    22d0ef2a
Name
Last commit
Last update
..
providers Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
cloud.go Loading commit data...
doc.go Loading commit data...
plugins.go Loading commit data...