From f9d1f7eb75c3696c75e7e42848de34d79b3253b8 Mon Sep 17 00:00:00 2001 From: Nick Sardo Date: Thu, 3 May 2018 13:14:55 -0700 Subject: [PATCH] Pass certificate URLs instead of the certificate structs --- pkg/cloudprovider/providers/gce/gce_targetproxy.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/cloudprovider/providers/gce/gce_targetproxy.go b/pkg/cloudprovider/providers/gce/gce_targetproxy.go index e04095a4e39..36d21bcff6b 100644 --- a/pkg/cloudprovider/providers/gce/gce_targetproxy.go +++ b/pkg/cloudprovider/providers/gce/gce_targetproxy.go @@ -85,14 +85,10 @@ func (gce *GCECloud) SetUrlMapForTargetHttpsProxy(proxy *compute.TargetHttpsProx } // SetSslCertificateForTargetHttpsProxy sets the given SslCertificate for the given TargetHttpsProxy. -func (gce *GCECloud) SetSslCertificateForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, sslCerts []*compute.SslCertificate) error { +func (gce *GCECloud) SetSslCertificateForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, sslCertURLs []string) error { mc := newTargetProxyMetricContext("set_ssl_cert") - var allCerts []string - for _, cert := range sslCerts { - allCerts = append(allCerts, cert.SelfLink) - } req := &compute.TargetHttpsProxiesSetSslCertificatesRequest{ - SslCertificates: allCerts, + SslCertificates: sslCertURLs, } return mc.Observe(gce.c.TargetHttpsProxies().SetSslCertificates(context.Background(), meta.GlobalKey(proxy.Name), req)) }