Skip to content

Commit

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

[cluster-autoscaler-release-1.29] allow customizing user agent for Azure cluster-autoscaler provider
  • Loading branch information
k8s-ci-robot authored Aug 14, 2024
2 parents f594da4 + b82f83f commit 0fc5abd
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 @@ -23,6 +23,7 @@ import (
"io/ioutil"
"net/http"
"net/url"
"os"
"regexp"
"sort"
"strconv"
Expand Down Expand Up @@ -228,7 +229,8 @@ func (util *AzUtil) DeleteVirtualMachine(rg string, name string) error {
}

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 0fc5abd

Please sign in to comment.