Skip to content

Commit

Permalink
Merge pull request #7033 from nojnhuh/azure-user-agent
Browse files Browse the repository at this point in the history
allow customizing user agent for Azure cluster-autoscaler provider
  • Loading branch information
k8s-ci-robot committed Jul 15, 2024
2 parents 3a1c5b9 + ab1e23f commit a43a324
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 @@ -244,7 +245,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 a43a324

Please sign in to comment.