Skip to content

Commit

Permalink
Merge pull request #7056 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…7033-to-cluster-autoscaler-release-1.27

[cluster-autoscaler-release-1.27] allow customizing user agent for Azure cluster-autoscaler provider
  • Loading branch information
k8s-ci-robot committed Aug 14, 2024
2 parents aa1d438 + 2f9b861 commit e254d80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cluster-autoscaler/cloudprovider/azure/azure_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"io/ioutil"
"net/http"
"net/url"
"os"
"regexp"
"sort"
"strconv"
Expand Down Expand Up @@ -235,7 +236,8 @@ func decodePkcs12(pkcs []byte, password string) (*x509.Certificate, *rsa.Private
}

func getUserAgentExtension() string {
return fmt.Sprintf("cluster-autoscaler/v%s", version.ClusterAutoscalerVersion)
suffix := os.Getenv("AZURE_CLUSTER_AUTOSCALER_USER_AGENT_SUFFIX")
return fmt.Sprintf("cluster-autoscaler%s/v%s", suffix, version.ClusterAutoscalerVersion)
}

func configureUserAgent(client *autorest.Client) {
Expand Down

0 comments on commit e254d80

Please sign in to comment.