Merge pull request #70459 from mvladev/fix-cloud-provider-openstack

fix openstack provider to handle only Cinder volumes
This commit is contained in:
k8s-ci-robot 2018-10-31 04:44:03 -07:00 committed by GitHub
commit 0325662cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -697,6 +697,11 @@ func (os *OpenStack) ShouldTrustDevicePath() bool {
// GetLabelsForVolume implements PVLabeler.GetLabelsForVolume
func (os *OpenStack) GetLabelsForVolume(ctx context.Context, pv *v1.PersistentVolume) (map[string]string, error) {
// Ignore if not Cinder.
if pv.Spec.Cinder == nil {
return nil, nil
}
// Ignore any volumes that are being provisioned
if pv.Spec.Cinder.VolumeID == k8s_volume.ProvisionedVolumeName {
return nil, nil