Skip to content

Commit 570952e

Browse files
authored
Merge pull request #441 from andyzhangx/ns-compatibility
fix: sercretNamesapce empty issue in old driver PV
2 parents 3000faf + c9b3041 commit 570952e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/blob/blob.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ func (d *Driver) GetAuthEnv(ctx context.Context, volumeID, protocol string, attr
291291
return accountName, containerName, authEnv, err
292292
}
293293

294+
// backward compatibility, old CSI driver PV does not have secretNamespace field
295+
if secretNamespace == "" {
296+
secretNamespace = "default"
297+
}
298+
294299
// 1. If keyVaultURL is not nil, preferentially use the key stored in key vault.
295300
// 2. Then if secrets map is not nil, use the key stored in the secrets map.
296301
// 3. Finally if both keyVaultURL and secrets map are nil, get the key from Azure.

0 commit comments

Comments
 (0)