From bccb40b7807e05358d982eabcfb548ef79a4c041 Mon Sep 17 00:00:00 2001 From: Richard Chen Date: Thu, 26 Jan 2023 14:33:53 -0800 Subject: [PATCH] fix --- cloud/scope/managedcontrolplane.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cloud/scope/managedcontrolplane.go b/cloud/scope/managedcontrolplane.go index 89de8163b..6b66fb94d 100644 --- a/cloud/scope/managedcontrolplane.go +++ b/cloud/scope/managedcontrolplane.go @@ -19,8 +19,6 @@ package scope import ( "context" "fmt" - "strings" - "sigs.k8s.io/cluster-api-provider-gcp/util/location" "google.golang.org/api/option" @@ -203,12 +201,6 @@ func (s *ManagedControlPlaneScope) GetAllNodePools(ctx context.Context) ([]infra return s.AllManagedMachinePools, s.AllMachinePools, nil } -func parseLocation(location string) string { - parts := strings.Split(location, "-") - region := strings.Join(parts[:2], "-") - return region -} - // Region returns the region of the GKE cluster. func (s *ManagedControlPlaneScope) Region() string { loc, _ := location.Parse(s.GCPManagedControlPlane.Spec.Location)