Skip to content

Commit 15279c7

Browse files
committed
fix(azure): fix credential caching key mismatch in UserAssignedIdentityCredentials
Use consistent azureCredentialsKey for both storing and loading cached credentials instead of mixing azureCredentialsKey and userAssignedIdentityCredentialsFilePath. This prevents repeated credential recreation and eliminates redundant log messages.
1 parent b06a3d8 commit 15279c7

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)