Skip to content

Commit

Permalink
add ua for cloud provider (#7502)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinForReal authored Nov 25, 2024
1 parent 94f67f9 commit d14de72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/provider/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import (
"sigs.k8s.io/cloud-provider-azure/pkg/provider/securitygroup"
"sigs.k8s.io/cloud-provider-azure/pkg/provider/subnet"
"sigs.k8s.io/cloud-provider-azure/pkg/provider/zone"
"sigs.k8s.io/cloud-provider-azure/pkg/version"

azcache "sigs.k8s.io/cloud-provider-azure/pkg/cache"
"sigs.k8s.io/cloud-provider-azure/pkg/consts"
Expand Down Expand Up @@ -466,6 +467,8 @@ func (az *Cloud) InitializeCloudFromConfig(ctx context.Context, config *config.C
az.configAzureClients(servicePrincipalToken, multiTenantServicePrincipalToken, networkResourceServicePrincipalToken)

if az.ComputeClientFactory == nil {
k8sVersion := version.Get().GitVersion
az.ARMClientConfig.UserAgent = fmt.Sprintf("kubernetes-cloudprovider/%s; %s", k8sVersion, az.ARMClientConfig.UserAgent)
var cred azcore.TokenCredential
if authProvider.IsMultiTenantModeEnabled() {
multiTenantCred := authProvider.GetMultiTenantIdentity()
Expand Down

0 comments on commit d14de72

Please sign in to comment.