Skip to content

Commit 5e3c399

Browse files
bryan-coxopenshift-cherrypick-robot
authored andcommitted
fix(azure): fix credential caching key mismatch in azureclient
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. Signed-off-by: Bryan Cox <[email protected]>
1 parent 2b5d887 commit 5e3c399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/storage/azure/azureclient/azureclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (c *Client) getCreds(ctx context.Context) (azcore.TokenCredential, error) {
111111
var ok bool
112112

113113
// We need to only store the Azure credentials once and reuse them after that.
114-
storedCreds, found := c.azureCredentials.Load(userAssignedIdentityCredentialsFilePath)
114+
storedCreds, found := c.azureCredentials.Load(azureCredentialsKey)
115115
if !found {
116116
klog.V(2).Info("Using UserAssignedIdentityCredentials for Azure authentication for managed Azure HCP")
117117
clientOptions := azcore.ClientOptions{

0 commit comments

Comments
 (0)