Skip to content

Commit a43a324

Browse files
authored
Merge pull request #7033 from nojnhuh/azure-user-agent
allow customizing user agent for Azure cluster-autoscaler provider
2 parents 3a1c5b9 + ab1e23f commit a43a324

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cluster-autoscaler/cloudprovider/azure/azure_util.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"io/ioutil"
2626
"net/http"
2727
"net/url"
28+
"os"
2829
"regexp"
2930
"sort"
3031
"strconv"
@@ -244,7 +245,8 @@ func decodePkcs12(pkcs []byte, password string) (*x509.Certificate, *rsa.Private
244245
}
245246

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

250252
func configureUserAgent(client *autorest.Client) {

0 commit comments

Comments
 (0)