Skip to content

Commit 981be9a

Browse files
authored
Merge pull request #1318 from damdo/capi-1.8
Bump CAPI to v1.8
2 parents ec96f4c + 43c0024 commit 981be9a

37 files changed

+313
-396
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
- name: golangci-lint
2424
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
2525
with:
26-
version: v1.58
26+
version: v1.61

.golangci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ linters:
1414
- errcheck
1515
- errchkjson
1616
- errname
17-
- exportloopref
17+
- copyloopvar
1818
- fatcontext
1919
- ginkgolinter
2020
- gocheckcompilerdirectives
@@ -148,6 +148,12 @@ issues:
148148
- linters:
149149
- gosec
150150
text: "G108: Profiling endpoint is automatically exposed on /debug/pprof"
151+
- linters:
152+
- gosec
153+
text: "G115: integer overflow conversion int -> int32"
154+
- linters:
155+
- govet
156+
text: "printf: non-constant format string in call to sigs.k8s.io/cluster-api/util/conditions.MarkFalse"
151157
- linters:
152158
- revive
153159
text: "exported: exported method .*\\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported"

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.10@sha256:45f2cab1eebfb90d214ab8ce896cefc320e5c8768b4b34bb402652d90c670875 as builder
16+
FROM golang:1.22.8@sha256:b274ff14d8eb9309b61b1a45333bf0559a554ebcf6732fa2012dbed9b01ea56f as builder
1717
WORKDIR /workspace
1818

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

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export GOPROXY
3333
export GO111MODULE=on
3434

3535
# Kubebuilder
36-
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.29.0
36+
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.30.0
3737
export KUBEBUILDER_CONTROLPLANE_START_TIMEOUT ?=60s
3838
export KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT ?=60s
3939

@@ -59,23 +59,23 @@ CONVERSION_VERIFIER:= $(TOOLS_BIN_DIR)/conversion-verifier
5959
# Binaries.
6060
CLUSTERCTL := $(BIN_DIR)/clusterctl
6161

62-
CONTROLLER_GEN_VER := v0.14.0
62+
CONTROLLER_GEN_VER := v0.16.3
6363
CONTROLLER_GEN_BIN := controller-gen
6464
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
6565

66-
CONVERSION_GEN_VER := v0.29.3
66+
CONVERSION_GEN_VER := v0.30.5
6767
CONVERSION_GEN_BIN := conversion-gen
6868
CONVERSION_GEN := $(TOOLS_BIN_DIR)/$(CONVERSION_GEN_BIN)-$(CONVERSION_GEN_VER)
6969

7070
ENVSUBST_VER := v1.4.2
7171
ENVSUBST_BIN := envsubst
7272
ENVSUBST := $(TOOLS_BIN_DIR)/$(ENVSUBST_BIN)
7373

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

78-
KIND_VER := v0.22.0
78+
KIND_VER := v0.24.0
7979
KIND_BIN := kind
8080
KIND := $(TOOLS_BIN_DIR)/$(KIND_BIN)-$(KIND_VER)
8181

@@ -87,12 +87,12 @@ 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.19.0
90+
GINKGO_VER := v2.20.2
9191
GINKGO_BIN := ginkgo
9292
GINKGO := $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)
9393
GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo
9494

95-
KUBECTL_VER := v1.29.3
95+
KUBECTL_VER := v1.30.5
9696
KUBECTL_BIN := kubectl
9797
KUBECTL := $(TOOLS_BIN_DIR)/$(KUBECTL_BIN)-$(KUBECTL_VER)
9898

api/v1beta1/gcpcluster_webhook_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ func TestGCPCluster_ValidateUpdate(t *testing.T) {
8787
},
8888
}
8989
for _, test := range tests {
90-
test := test
9190
t.Run(test.name, func(t *testing.T) {
9291
t.Parallel()
9392
warn, err := test.newCluster.ValidateUpdate(test.oldCluster)

api/v1beta1/gcpclustertemplate_webhook_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func TestGCPClusterTemplate_ValidateUpdate(t *testing.T) {
8181
},
8282
}
8383
for _, test := range tests {
84-
test := test
8584
t.Run(test.name, func(t *testing.T) {
8685
t.Parallel()
8786
warn, err := test.newTemplate.ValidateUpdate(test.oldTemplate)

api/v1beta1/gcpmachine_webhook_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ func TestGCPMachine_ValidateCreate(t *testing.T) {
167167
},
168168
}
169169
for _, test := range tests {
170-
test := test
171170
t.Run(test.name, func(t *testing.T) {
172171
t.Parallel()
173172
warn, err := test.GCPMachine.ValidateCreate()

api/v1beta1/gcpmachinetemplate_webhook_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ func TestGCPMachineTemplate_ValidateCreate(t *testing.T) {
107107
},
108108
}
109109
for _, test := range tests {
110-
test := test
111110
t.Run(test.name, func(t *testing.T) {
112111
t.Parallel()
113112
warn, err := test.template.ValidateCreate()

cloud/scope/managedcontrolplane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func (s *ManagedControlPlaneScope) GetCredential() *Credential {
180180

181181
// GetAllNodePools gets all node pools for the control plane.
182182
func (s *ManagedControlPlaneScope) GetAllNodePools(ctx context.Context) ([]infrav1exp.GCPManagedMachinePool, []clusterv1exp.MachinePool, error) {
183-
if s.AllManagedMachinePools == nil || len(s.AllManagedMachinePools) == 0 {
183+
if len(s.AllManagedMachinePools) == 0 {
184184
listOptions := []client.ListOption{
185185
client.InNamespace(s.GCPManagedControlPlane.Namespace),
186186
client.MatchingLabels(map[string]string{clusterv1.ClusterNameLabel: s.Cluster.Name}),

cloud/scope/managedmachinepool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func ConvertToSdkNodePool(nodePool infrav1exp.GCPManagedMachinePool, machinePool
237237
sdkNodePool.Config.DiskType = string(*nodePool.Spec.DiskType)
238238
}
239239
if nodePool.Spec.DiskSizeGB != nil {
240-
sdkNodePool.Config.DiskSizeGb = int32(*nodePool.Spec.DiskSizeGB)
240+
sdkNodePool.Config.DiskSizeGb = int32(*nodePool.Spec.DiskSizeGB) //nolint:gosec
241241
}
242242
if len(nodePool.Spec.NodeNetwork.Tags) != 0 {
243243
sdkNodePool.Config.Tags = nodePool.Spec.NodeNetwork.Tags

0 commit comments

Comments
 (0)