fix azure file size grow issue

This commit is contained in:
andyzhangx 2018-05-28 02:46:18 +00:00
parent b9e46f5422
commit e330741d6d

View File

@ -150,7 +150,7 @@ func (plugin *azureFilePlugin) ExpandVolumeDevice(
newSize resource.Quantity,
oldSize resource.Quantity) (resource.Quantity, error) {
if spec.PersistentVolume != nil || spec.PersistentVolume.Spec.AzureFile == nil {
if spec.PersistentVolume == nil || spec.PersistentVolume.Spec.AzureFile == nil {
return oldSize, fmt.Errorf("invalid PV spec")
}
shareName := spec.PersistentVolume.Spec.AzureFile.ShareName