Merge pull request #94126 from andyzhangx/windows-azurefile-mountoptions

fix: use sensitiveOptions on Windows mount
This commit is contained in:
Kubernetes Prow Robot 2020-09-01 16:35:20 -07:00 committed by GitHub
commit 82475c3186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,7 +287,8 @@ func (b *azureFileMounter) SetUpAt(dir string, mounterArgs volume.MounterArgs) e
source = fmt.Sprintf("%s%s%s.file.%s%s%s", osSeparator, osSeparator, accountName, getStorageEndpointSuffix(b.plugin.host.GetCloudProvider()), osSeparator, b.shareName)
if runtime.GOOS == "windows" {
sensitiveMountOptions = []string{fmt.Sprintf("AZURE\\%s", accountName), accountKey}
mountOptions = []string{fmt.Sprintf("AZURE\\%s", accountName)}
sensitiveMountOptions = []string{accountKey}
} else {
if err := os.MkdirAll(dir, 0700); err != nil {
return err