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

View File

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