Skip to content

Commit 83cdaed

Browse files
authored
Merge pull request #1235 from cpanato/update-capi-16
Update CAPI / go / dependencies for release-1.6
2 parents be17146 + bf05c4d commit 83cdaed

File tree

20 files changed

+215
-210
lines changed

20 files changed

+215
-210
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
- name: golangci-lint
1919
uses: golangci/golangci-lint-action@v3
2020
with:
21-
version: "v1.55"
21+
version: v1.58

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Build the manager binary
16-
FROM golang:1.21.7@sha256:549dd88a1a53715f177b41ab5fee25f7a376a6bb5322ac7abe263480d9554021 as builder
16+
FROM golang:1.21.10@sha256:45f2cab1eebfb90d214ab8ce896cefc320e5c8768b4b34bb402652d90c670875 as builder
1717
WORKDIR /workspace
1818

1919
# Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ENVSUBST_VER := v1.4.2
7171
ENVSUBST_BIN := envsubst
7272
ENVSUBST := $(TOOLS_BIN_DIR)/$(ENVSUBST_BIN)
7373

74-
GOLANGCI_LINT_VER := v1.55.2
74+
GOLANGCI_LINT_VER := v1.58.0
7575
GOLANGCI_LINT_BIN := golangci-lint
7676
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
7777

@@ -87,7 +87,7 @@ RELEASE_NOTES_VER := v0.11.0
8787
RELEASE_NOTES_BIN := release-notes
8888
RELEASE_NOTES := $(TOOLS_BIN_DIR)/$(RELEASE_NOTES_BIN)-$(RELEASE_NOTES_VER)
8989

90-
GINKGO_VER := v2.15.0
90+
GINKGO_VER := v2.17.3
9191
GINKGO_BIN := ginkgo
9292
GINKGO := $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)
9393
GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo
@@ -140,7 +140,7 @@ endif
140140
# Build time versioning details.
141141
LDFLAGS := $(shell hack/version.sh)
142142

143-
GOLANG_VERSION := 1.21.6
143+
GOLANG_VERSION := 1.21.10
144144

145145
# CI
146146
CAPG_WORKER_CLUSTER_KUBECONFIG ?= "/tmp/kubeconfig"
@@ -464,7 +464,7 @@ create-management-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KIND) $(KUBECTL)
464464
./hack/install-cert-manager.sh
465465

466466
# Deploy CAPI
467-
curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.2/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -
467+
curl --retry $(CURL_RETRIES) -sSL https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.5/cluster-api-components.yaml | $(ENVSUBST) | $(KUBECTL) apply -f -
468468

469469
# Deploy CAPG
470470
$(KIND) load docker-image $(CONTROLLER_IMG)-$(ARCH):$(TAG) --name=clusterapi

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ settings = {
1818
"deploy_cert_manager": True,
1919
"preload_images_for_kind": True,
2020
"kind_cluster_name": "capg",
21-
"capi_version": "v1.6.2",
21+
"capi_version": "v1.6.5",
2222
"cert_manager_version": "v1.11.0",
2323
"kubernetes_version": "v1.28.6",
2424
}

cloud/providerid/providerid_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TestProviderID_New(t *testing.T) {
6666
}
6767

6868
for _, tc := range testCases {
69-
t.Run(tc.testname, func(t *testing.T) {
69+
t.Run(tc.testname, func(_ *testing.T) {
7070
providerID, err := providerid.New(tc.project, tc.location, tc.name)
7171

7272
if tc.expectError {
@@ -102,7 +102,7 @@ func TestProviderID_NewFromResourceURL(t *testing.T) {
102102
}
103103

104104
for _, tc := range testCases {
105-
t.Run(tc.testname, func(t *testing.T) {
105+
t.Run(tc.testname, func(_ *testing.T) {
106106
providerID, err := providerid.NewFromResourceURL(tc.resourceURL)
107107

108108
if tc.expectError {

cloud/services/compute/firewalls/service.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ package firewalls
1919
import (
2020
"context"
2121

22+
k8scloud "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
2223
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2324
"google.golang.org/api/compute/v1"
25+
2426
"sigs.k8s.io/cluster-api-provider-gcp/cloud"
2527
)
2628

2729
type firewallsInterface interface {
28-
Get(ctx context.Context, key *meta.Key) (*compute.Firewall, error)
29-
Insert(ctx context.Context, key *meta.Key, obj *compute.Firewall) error
30-
Update(ctx context.Context, key *meta.Key, obj *compute.Firewall) error
31-
Delete(ctx context.Context, key *meta.Key) error
30+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.Firewall, error)
31+
Insert(ctx context.Context, key *meta.Key, obj *compute.Firewall, options ...k8scloud.Option) error
32+
Update(ctx context.Context, key *meta.Key, obj *compute.Firewall, options ...k8scloud.Option) error
33+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3234
}
3335

3436
// Scope is an interfaces that hold used methods.

cloud/services/compute/instances/reconcile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func TestService_createOrGetInstance(t *testing.T) {
211211
mockInstance: &cloud.MockInstances{
212212
ProjectRouter: &cloud.SingleProjectRouter{ID: "proj-id"},
213213
Objects: map[meta.Key]*cloud.MockInstancesObj{},
214-
GetHook: func(ctx context.Context, key *meta.Key, m *cloud.MockInstances) (bool, *compute.Instance, error) {
214+
GetHook: func(_ context.Context, _ *meta.Key, _ *cloud.MockInstances, _ ...cloud.Option) (bool, *compute.Instance, error) {
215215
return true, &compute.Instance{}, &googleapi.Error{Code: http.StatusBadRequest}
216216
},
217217
},

cloud/services/compute/instances/service.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,24 @@ import (
2121

2222
"github.com/go-logr/logr"
2323

24+
k8scloud "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
2425
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter"
2526
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2627
"google.golang.org/api/compute/v1"
28+
2729
"sigs.k8s.io/cluster-api-provider-gcp/cloud"
2830
)
2931

3032
type instancesInterface interface {
31-
Get(ctx context.Context, key *meta.Key) (*compute.Instance, error)
32-
Insert(ctx context.Context, key *meta.Key, obj *compute.Instance) error
33-
Delete(ctx context.Context, key *meta.Key) error
33+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.Instance, error)
34+
Insert(ctx context.Context, key *meta.Key, obj *compute.Instance, options ...k8scloud.Option) error
35+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3436
}
3537

3638
type instancegroupsInterface interface {
37-
AddInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsAddInstancesRequest) error
38-
ListInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsListInstancesRequest, fl *filter.F) ([]*compute.InstanceWithNamedPorts, error)
39-
RemoveInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsRemoveInstancesRequest) error
39+
AddInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsAddInstancesRequest, options ...k8scloud.Option) error
40+
ListInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsListInstancesRequest, fl *filter.F, options ...k8scloud.Option) ([]*compute.InstanceWithNamedPorts, error)
41+
RemoveInstances(ctx context.Context, key *meta.Key, req *compute.InstanceGroupsRemoveInstancesRequest, options ...k8scloud.Option) error
4042
}
4143

4244
// Scope is an interfaces that hold used methods.

cloud/services/compute/loadbalancers/reconcile.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ import (
2121

2222
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2323
"google.golang.org/api/compute/v1"
24+
2425
"k8s.io/utils/ptr"
26+
2527
"sigs.k8s.io/cluster-api-provider-gcp/cloud/gcperrors"
2628
"sigs.k8s.io/controller-runtime/pkg/log"
2729
)

cloud/services/compute/loadbalancers/service.go

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,48 +19,50 @@ package loadbalancers
1919
import (
2020
"context"
2121

22+
k8scloud "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
2223
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter"
2324
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta"
2425
"google.golang.org/api/compute/v1"
26+
2527
"sigs.k8s.io/cluster-api-provider-gcp/cloud"
2628
)
2729

2830
type addressesInterface interface {
29-
Get(ctx context.Context, key *meta.Key) (*compute.Address, error)
30-
Insert(ctx context.Context, key *meta.Key, obj *compute.Address) error
31-
Delete(ctx context.Context, key *meta.Key) error
31+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.Address, error)
32+
Insert(ctx context.Context, key *meta.Key, obj *compute.Address, options ...k8scloud.Option) error
33+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3234
}
3335

3436
type backendservicesInterface interface {
35-
Get(ctx context.Context, key *meta.Key) (*compute.BackendService, error)
36-
Insert(ctx context.Context, key *meta.Key, obj *compute.BackendService) error
37-
Update(context.Context, *meta.Key, *compute.BackendService) error
38-
Delete(ctx context.Context, key *meta.Key) error
37+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.BackendService, error)
38+
Insert(ctx context.Context, key *meta.Key, obj *compute.BackendService, options ...k8scloud.Option) error
39+
Update(ctx context.Context, key *meta.Key, obj *compute.BackendService, options ...k8scloud.Option) error
40+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
3941
}
4042

4143
type forwardingrulesInterface interface {
42-
Get(ctx context.Context, key *meta.Key) (*compute.ForwardingRule, error)
43-
Insert(ctx context.Context, key *meta.Key, obj *compute.ForwardingRule) error
44-
Delete(ctx context.Context, key *meta.Key) error
44+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.ForwardingRule, error)
45+
Insert(ctx context.Context, key *meta.Key, obj *compute.ForwardingRule, options ...k8scloud.Option) error
46+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
4547
}
4648

4749
type healthchecksInterface interface {
48-
Get(ctx context.Context, key *meta.Key) (*compute.HealthCheck, error)
49-
Insert(ctx context.Context, key *meta.Key, obj *compute.HealthCheck) error
50-
Delete(ctx context.Context, key *meta.Key) error
50+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.HealthCheck, error)
51+
Insert(ctx context.Context, key *meta.Key, obj *compute.HealthCheck, options ...k8scloud.Option) error
52+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
5153
}
5254

5355
type instancegroupsInterface interface {
54-
Get(ctx context.Context, key *meta.Key) (*compute.InstanceGroup, error)
55-
List(ctx context.Context, zone string, fl *filter.F) ([]*compute.InstanceGroup, error)
56-
Insert(ctx context.Context, key *meta.Key, obj *compute.InstanceGroup) error
57-
Delete(ctx context.Context, key *meta.Key) error
56+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.InstanceGroup, error)
57+
List(ctx context.Context, zone string, fl *filter.F, options ...k8scloud.Option) ([]*compute.InstanceGroup, error)
58+
Insert(ctx context.Context, key *meta.Key, obj *compute.InstanceGroup, options ...k8scloud.Option) error
59+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
5860
}
5961

6062
type targettcpproxiesInterface interface {
61-
Get(ctx context.Context, key *meta.Key) (*compute.TargetTcpProxy, error)
62-
Insert(ctx context.Context, key *meta.Key, obj *compute.TargetTcpProxy) error
63-
Delete(ctx context.Context, key *meta.Key) error
63+
Get(ctx context.Context, key *meta.Key, options ...k8scloud.Option) (*compute.TargetTcpProxy, error)
64+
Insert(ctx context.Context, key *meta.Key, obj *compute.TargetTcpProxy, options ...k8scloud.Option) error
65+
Delete(ctx context.Context, key *meta.Key, options ...k8scloud.Option) error
6466
}
6567

6668
// Scope is an interfaces that hold used methods.

0 commit comments

Comments
 (0)