Skip to content

Commit 7bea55c

Browse files
committed
fix(azure): fix credential caching key mismatch in driver storageAccountsClient
Similar to the azureclient fix, use consistent azureCredentialsKey for both storing and loading cached credentials instead of mixing azureCredentialsKey and userAssignedIdentityCredentialsFilePath. This prevents repeated credential recreation in the Azure driver's storageAccountsClient method.
1 parent 15279c7 commit 7bea55c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/storage/azure/azure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ func (d *driver) storageAccountsClient(cfg *Azure, environment autorestazure.Env
384384
var ok bool
385385

386386
// We need to only store the Azure credentials once and reuse them after that.
387-
storedCreds, found := d.azureCredentials.Load(userAssignedIdentityCredentialsFilePath)
387+
storedCreds, found := d.azureCredentials.Load(azureCredentialsKey)
388388
if !found {
389389
klog.V(2).Info("Using UserAssignedIdentityCredentials for Azure authentication for managed Azure HCP")
390390
clientOptions := azcore.ClientOptions{

0 commit comments

Comments
 (0)