Merge pull request #97228 from chendave/unboundVolume

Make sure the volume name is not empty when the PVC is bound
This commit is contained in:
Kubernetes Prow Robot 2020-12-11 20:17:26 -08:00 committed by GitHub
commit 2bd115e364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1369,6 +1369,7 @@ func CreatePodWithPersistentVolume(client clientset.Interface, namespace string,
pv.Status.Phase = v1.VolumeBound
// bind pvc to "pv-$i"
pvc.Spec.VolumeName = pv.Name
pvc.Status.Phase = v1.ClaimBound
} else {
pv.Status.Phase = v1.VolumeAvailable