From 6fd23f9c49dca84a32b7ffcd041fa16da7e9d112 Mon Sep 17 00:00:00 2001 From: Aleksandra Gacek Date: Thu, 17 Jun 2021 13:21:30 +0200 Subject: [PATCH] Allow overriding userAgent in Custom GCE client in gce cloud provider. --- cluster-autoscaler/cloudprovider/gce/autoscaling_gce_client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster-autoscaler/cloudprovider/gce/autoscaling_gce_client.go b/cluster-autoscaler/cloudprovider/gce/autoscaling_gce_client.go index 1424a349b823..0b6cd09360e2 100644 --- a/cluster-autoscaler/cloudprovider/gce/autoscaling_gce_client.go +++ b/cluster-autoscaler/cloudprovider/gce/autoscaling_gce_client.go @@ -107,13 +107,14 @@ func NewAutoscalingGceClientV1(client *http.Client, projectId string, userAgent // NewCustomAutoscalingGceClientV1 creates a new client using custom server url and timeouts // for communicating with GCE v1 API. -func NewCustomAutoscalingGceClientV1(client *http.Client, projectId, serverUrl string, +func NewCustomAutoscalingGceClientV1(client *http.Client, projectId, serverUrl, userAgent string, waitTimeout, pollInterval time.Duration, deletionPollInterval time.Duration) (*autoscalingGceClientV1, error) { gceService, err := gce.New(client) if err != nil { return nil, err } gceService.BasePath = serverUrl + gceService.UserAgent = userAgent return &autoscalingGceClientV1{ projectId: projectId,