Skip to content

Commit

Permalink
allow customizing user agent for Azure cluster-autoscaler provider
Browse files Browse the repository at this point in the history
  • Loading branch information
nojnhuh authored and k8s-infra-cherrypick-robot committed Jul 15, 2024
1 parent 06465a3 commit 2f9b861
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 @@ -234,7 +235,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 2f9b861

Please sign in to comment.