Skip to content

Commit d14de72

Browse files
add ua for cloud provider (#7502)
1 parent 94f67f9 commit d14de72

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/provider/azure.go

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ import (
7171
"sigs.k8s.io/cloud-provider-azure/pkg/provider/securitygroup"
7272
"sigs.k8s.io/cloud-provider-azure/pkg/provider/subnet"
7373
"sigs.k8s.io/cloud-provider-azure/pkg/provider/zone"
74+
"sigs.k8s.io/cloud-provider-azure/pkg/version"
7475

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

468469
if az.ComputeClientFactory == nil {
470+
k8sVersion := version.Get().GitVersion
471+
az.ARMClientConfig.UserAgent = fmt.Sprintf("kubernetes-cloudprovider/%s; %s", k8sVersion, az.ARMClientConfig.UserAgent)
469472
var cred azcore.TokenCredential
470473
if authProvider.IsMultiTenantModeEnabled() {
471474
multiTenantCred := authProvider.GetMultiTenantIdentity()

0 commit comments

Comments
 (0)