diff --git a/pkg/volume/azure_file/azure_file.go b/pkg/volume/azure_file/azure_file.go index fbc3b1a4735..9d0551aa5c4 100644 --- a/pkg/volume/azure_file/azure_file.go +++ b/pkg/volume/azure_file/azure_file.go @@ -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