@@ -34,6 +34,7 @@ import (
3434 "github.com/pkg/errors"
3535 infrav1exp "sigs.k8s.io/cluster-api-provider-gcp/exp/api/v1beta1"
3636 clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
37+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
3738 v1beta1patch "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch"
3839 "sigs.k8s.io/controller-runtime/pkg/client"
3940)
@@ -43,8 +44,8 @@ type ManagedMachinePoolScopeParams struct {
4344 ManagedClusterClient * container.ClusterManagerClient
4445 InstanceGroupManagersClient * compute.InstanceGroupManagersClient
4546 Client client.Client
46- Cluster * clusterv1beta1 .Cluster
47- MachinePool * clusterv1beta1 .MachinePool
47+ Cluster * clusterv1 .Cluster
48+ MachinePool * clusterv1 .MachinePool
4849 GCPManagedCluster * infrav1exp.GCPManagedCluster
4950 GCPManagedControlPlane * infrav1exp.GCPManagedControlPlane
5051 GCPManagedMachinePool * infrav1exp.GCPManagedMachinePool
@@ -106,8 +107,8 @@ type ManagedMachinePoolScope struct {
106107 client client.Client
107108 patchHelper * v1beta1patch.Helper
108109
109- Cluster * clusterv1beta1 .Cluster
110- MachinePool * clusterv1beta1 .MachinePool
110+ Cluster * clusterv1 .Cluster
111+ MachinePool * clusterv1 .MachinePool
111112 GCPManagedCluster * infrav1exp.GCPManagedCluster
112113 GCPManagedControlPlane * infrav1exp.GCPManagedControlPlane
113114 GCPManagedMachinePool * infrav1exp.GCPManagedMachinePool
@@ -166,7 +167,7 @@ func NodePoolResourceLabels(additionalLabels infrav1.Labels, clusterName string)
166167}
167168
168169// ConvertToSdkNodePool converts a node pool to format that is used by GCP SDK.
169- func ConvertToSdkNodePool (nodePool infrav1exp.GCPManagedMachinePool , machinePool clusterv1beta1 .MachinePool , regional bool , clusterName string ) * containerpb.NodePool {
170+ func ConvertToSdkNodePool (nodePool infrav1exp.GCPManagedMachinePool , machinePool clusterv1 .MachinePool , regional bool , clusterName string ) * containerpb.NodePool {
170171 replicas := * machinePool .Spec .Replicas
171172 if regional {
172173 if len (nodePool .Spec .NodeLocations ) != 0 {
@@ -275,7 +276,7 @@ func ConvertToSdkNodePool(nodePool infrav1exp.GCPManagedMachinePool, machinePool
275276}
276277
277278// ConvertToSdkNodePools converts node pools to format that is used by GCP SDK.
278- func ConvertToSdkNodePools (nodePools []infrav1exp.GCPManagedMachinePool , machinePools []clusterv1beta1 .MachinePool , regional bool , clusterName string ) []* containerpb.NodePool {
279+ func ConvertToSdkNodePools (nodePools []infrav1exp.GCPManagedMachinePool , machinePools []clusterv1 .MachinePool , regional bool , clusterName string ) []* containerpb.NodePool {
279280 res := []* containerpb.NodePool {}
280281 for i := range nodePools {
281282 res = append (res , ConvertToSdkNodePool (nodePools [i ], machinePools [i ], regional , clusterName ))
0 commit comments