mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Respect ignore-volume-az option in admission plugin
We appear to be respecting this options when provisioning the volume but when PV is admitted the zone/region fields get added back to the PV and hence defeating the purpose of the option.
This commit is contained in:
parent
4e8a7f4a4b
commit
ea5bea2b9f
@ -726,6 +726,11 @@ func (os *OpenStack) GetLabelsForVolume(ctx context.Context, pv *v1.PersistentVo
|
|||||||
return nil, nil
|
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
|
// Get Volume
|
||||||
volume, err := os.getVolume(pv.Spec.Cinder.VolumeID)
|
volume, err := os.getVolume(pv.Spec.Cinder.VolumeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user