From 565c02cd4ace095cde58c764c089f96dd66396f9 Mon Sep 17 00:00:00 2001 From: Sebastian Florek Date: Wed, 4 Oct 2023 15:15:33 +0200 Subject: [PATCH] dependency fixes after fork rebase --- api/v1alpha3/zz_generated.conversion.go | 1 + api/v1alpha4/zz_generated.conversion.go | 1 + .../services/container/clusters/reconcile.go | 14 ++++--- exp/api/v1beta1/zz_generated.deepcopy.go | 40 +++++++++++++++++++ go.mod | 23 +++++------ go.sum | 20 +++++----- 6 files changed, 71 insertions(+), 28 deletions(-) diff --git a/api/v1alpha3/zz_generated.conversion.go b/api/v1alpha3/zz_generated.conversion.go index 921468874..375d737b3 100644 --- a/api/v1alpha3/zz_generated.conversion.go +++ b/api/v1alpha3/zz_generated.conversion.go @@ -815,6 +815,7 @@ func autoConvert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in *v1beta1.Network out.Subnets = nil } out.LoadBalancerBackendPort = (*int32)(unsafe.Pointer(in.LoadBalancerBackendPort)) + // WARNING: in.DatapathProvider requires manual conversion: does not exist in peer-type return nil } diff --git a/api/v1alpha4/zz_generated.conversion.go b/api/v1alpha4/zz_generated.conversion.go index 3d6b0f613..67c3c285d 100644 --- a/api/v1alpha4/zz_generated.conversion.go +++ b/api/v1alpha4/zz_generated.conversion.go @@ -982,6 +982,7 @@ func autoConvert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in *v1beta1.Network out.Subnets = nil } out.LoadBalancerBackendPort = (*int32)(unsafe.Pointer(in.LoadBalancerBackendPort)) + // WARNING: in.DatapathProvider requires manual conversion: does not exist in peer-type return nil } diff --git a/cloud/services/container/clusters/reconcile.go b/cloud/services/container/clusters/reconcile.go index 67876331a..56ce183f8 100644 --- a/cloud/services/container/clusters/reconcile.go +++ b/cloud/services/container/clusters/reconcile.go @@ -262,10 +262,10 @@ func (s *Service) createCluster(ctx context.Context, log *logr.Logger) error { ReleaseChannel: &containerpb.ReleaseChannel{ Channel: convertToSdkReleaseChannel(s.scope.GCPManagedControlPlane.Spec.ReleaseChannel), }, - WorkloadIdentityConfig: s.createWorkloadIdentityConfig(), - NetworkConfig: s.createNetworkConfig(), - AddonsConfig: s.createAddonsConfig(), - ResourceLabels: s.scope.GCPManagedCluster.Labels, + WorkloadIdentityConfig: s.createWorkloadIdentityConfig(), + NetworkConfig: s.createNetworkConfig(), + AddonsConfig: s.createAddonsConfig(), + ResourceLabels: s.scope.GCPManagedCluster.Labels, MasterAuthorizedNetworksConfig: convertToSdkMasterAuthorizedNetworksConfig(s.scope.GCPManagedControlPlane.Spec.MasterAuthorizedNetworksConfig), } @@ -464,11 +464,13 @@ func (s *Service) checkDiffAndPrepareUpdate(existingCluster *containerpb.Cluster log.V(4).Info("Master authorized networks config update check", "desired", desiredMasterAuthorizedNetworksConfig) } - log.V(4).Info("Update cluster request. ", "needUpdate", needUpdate, "updateClusterRequest", &updateClusterRequest) - return needUpdate, &containerpb.UpdateClusterRequest{ + updateClusterRequest := containerpb.UpdateClusterRequest{ Name: s.scope.ClusterFullName(), Update: &clusterUpdate, } + + log.V(4).Info("Update cluster request. ", "needUpdate", needUpdate, "updateClusterRequest", &updateClusterRequest) + return needUpdate, &updateClusterRequest } func (s *Service) hasDesiredVersion(controlPlaneVersion *string, clusterVersion string) bool { diff --git a/exp/api/v1beta1/zz_generated.deepcopy.go b/exp/api/v1beta1/zz_generated.deepcopy.go index ac7942b31..dc85e2dd4 100644 --- a/exp/api/v1beta1/zz_generated.deepcopy.go +++ b/exp/api/v1beta1/zz_generated.deepcopy.go @@ -329,6 +329,11 @@ func (in *GCPManagedMachinePoolSpec) DeepCopyInto(out *GCPManagedMachinePoolSpec *out = new(NodePoolAutoScaling) (*in).DeepCopyInto(*out) } + if in.Management != nil { + in, out := &in.Management, &out.Management + *out = new(NodeManagement) + (*in).DeepCopyInto(*out) + } if in.KubernetesLabels != nil { in, out := &in.KubernetesLabels, &out.KubernetesLabels *out = make(apiv1beta1.Labels, len(*in)) @@ -353,6 +358,16 @@ func (in *GCPManagedMachinePoolSpec) DeepCopyInto(out *GCPManagedMachinePoolSpec *out = make([]string, len(*in)) copy(*out, *in) } + if in.Preemptible != nil { + in, out := &in.Preemptible, &out.Preemptible + *out = new(bool) + **out = **in + } + if in.Spot != nil { + in, out := &in.Spot, &out.Spot + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPManagedMachinePoolSpec. @@ -433,6 +448,31 @@ func (in *MasterAuthorizedNetworksConfigCidrBlock) DeepCopy() *MasterAuthorizedN return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeManagement) DeepCopyInto(out *NodeManagement) { + *out = *in + if in.AutoUpgrade != nil { + in, out := &in.AutoUpgrade, &out.AutoUpgrade + *out = new(bool) + **out = **in + } + if in.AutoRepair != nil { + in, out := &in.AutoRepair, &out.AutoRepair + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeManagement. +func (in *NodeManagement) DeepCopy() *NodeManagement { + if in == nil { + return nil + } + out := new(NodeManagement) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodePoolAutoScaling) DeepCopyInto(out *NodePoolAutoScaling) { *out = *in diff --git a/go.mod b/go.mod index e917c3add..7aa6e54ec 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module sigs.k8s.io/cluster-api-provider-gcp go 1.20 -replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.5.0 - require ( cloud.google.com/go/compute v1.23.0 cloud.google.com/go/container v1.26.0 @@ -20,6 +18,7 @@ require ( golang.org/x/crypto v0.13.0 golang.org/x/mod v0.12.0 golang.org/x/net v0.15.0 + golang.org/x/oauth2 v0.12.0 google.golang.org/api v0.143.0 google.golang.org/grpc v1.58.2 k8s.io/api v0.27.2 @@ -28,13 +27,11 @@ require ( k8s.io/component-base v0.27.2 k8s.io/klog/v2 v2.90.1 k8s.io/utils v0.0.0-20230209194617-a36077c30491 - sigs.k8s.io/cluster-api v1.5.0 - sigs.k8s.io/cluster-api/test v1.5.0 - sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/cluster-api v1.5.2 + sigs.k8s.io/cluster-api/test v1.5.2 + sigs.k8s.io/controller-runtime v0.15.1 ) -require golang.org/x/sync v0.3.0 // indirect - require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/BurntSushi/toml v1.0.0 // indirect @@ -52,7 +49,7 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coredns/caddy v1.1.0 // indirect - github.com/coredns/corefile-migration v1.0.20 // indirect + github.com/coredns/corefile-migration v1.0.21 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v24.0.5+incompatible // indirect @@ -65,7 +62,7 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gobuffalo/flect v1.0.2 // indirect @@ -119,8 +116,8 @@ require ( go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect - go.uber.org/zap v1.24.0 // indirect; indirect// indirect - golang.org/x/oauth2 v0.12.0 // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.12.0 // indirect golang.org/x/term v0.12.0 // indirect golang.org/x/text v0.13.0 // indirect @@ -139,9 +136,11 @@ require ( k8s.io/apiextensions-apiserver v0.27.2 // indirect k8s.io/apiserver v0.27.2 // indirect k8s.io/cluster-bootstrap v0.27.2 // indirect - k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kind v0.20.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f diff --git a/go.sum b/go.sum index 701c97f76..1829ec38b 100644 --- a/go.sum +++ b/go.sum @@ -105,8 +105,8 @@ github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnht github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coredns/caddy v1.1.0 h1:ezvsPrT/tA/7pYDBZxu0cT0VmWk75AfIaf6GSYCNMf0= github.com/coredns/caddy v1.1.0/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= -github.com/coredns/corefile-migration v1.0.20 h1:MdOkT6F3ehju/n9tgxlGct8XAajOX2vN+wG7To4BWSI= -github.com/coredns/corefile-migration v1.0.20/go.mod h1:XnhgULOEouimnzgn0t4WPuFDN2/PJQcTxdWKC5eXNGE= +github.com/coredns/corefile-migration v1.0.21 h1:W/DCETrHDiFo0Wj03EyMkaQ9fwsmSgqTCQDHpceaSsE= +github.com/coredns/corefile-migration v1.0.21/go.mod h1:XnhgULOEouimnzgn0t4WPuFDN2/PJQcTxdWKC5eXNGE= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -166,8 +166,8 @@ github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= -github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -934,12 +934,12 @@ k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/cluster-api v1.5.0 h1:pwXvzScbAwnrB7EWHTApzW+VQfrj2OSrWAQDC9+bcbU= -sigs.k8s.io/cluster-api v1.5.0/go.mod h1:ZSEP01t8oT6104gB4ljsOwwp5uJcI8SWy8IFp2HUvrc= -sigs.k8s.io/cluster-api/test v1.5.0 h1:ePfrh7S+eaVWy+D0ca4AjzhBqrhXxRE9NTr5te4hCa0= -sigs.k8s.io/cluster-api/test v1.5.0/go.mod h1:Ii5Mh9oVq7QJEtiUkGg9mM2qojjWxvsqmL8TMlwZViM= -sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= -sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/cluster-api v1.5.2 h1:pCsyEHwTBb7n+U5Z2OA5STxdJ1EuSpJv8FLBx4lii3s= +sigs.k8s.io/cluster-api v1.5.2/go.mod h1:EGJUNpFWi7dF426tO8MG/jE+w7T0UO5KyMnOwQ5riUY= +sigs.k8s.io/cluster-api/test v1.5.2 h1:Hlorgn4ebGdSxP4IZAT7eMweAowh4n0/vdhc4HAPNF8= +sigs.k8s.io/cluster-api/test v1.5.2/go.mod h1:mFlsY1y0lApBgQyXbmVprdzCK+9MQNp1C38K+aZdn5A= +sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= +sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.20.0 h1:f0sc3v9mQbGnjBUaqSFST1dwIuiikKVGgoTwpoP33a8=