Merge pull request #88424 from gnufied/respect-ignore-volume-az

Respect ignore-volume-az option in admission plugin
This commit is contained in:
Kubernetes Prow Robot
2020-02-24 11:02:57 -08:00
committed by GitHub

View File

@@ -726,6 +726,11 @@ func (os *OpenStack) GetLabelsForVolume(ctx context.Context, pv *v1.PersistentVo
return nil, nil
}
// if volume az is to be ignored we should return nil from here
if os.bsOpts.IgnoreVolumeAZ {
return nil, nil
}
// Get Volume
volume, err := os.getVolume(pv.Spec.Cinder.VolumeID)
if err != nil {