Merge pull request #76988 from andyzhangx/azurefile-create

specify azure file share name in azure file plugin
This commit is contained in:
Kubernetes Prow Robot
2019-04-24 14:21:09 -07:00
committed by GitHub
2 changed files with 16 additions and 7 deletions

View File

@@ -60,9 +60,13 @@ func (f *azureFileClient) createFileShare(accountName, accountKey, name string,
}
share := fileClient.GetShareReference(name)
share.Properties.Quota = sizeGiB
if err = share.Create(nil); err != nil {
newlyCreated, err := share.CreateIfNotExists(nil)
if err != nil {
return fmt.Errorf("failed to create file share, err: %v", err)
}
if !newlyCreated {
klog.V(2).Infof("file share(%s) under account(%s) already exists", name, accountName)
}
return nil
}