Skip to content

Commit 9d08b8c

Browse files
committed
Bump dependencies
1 parent da8f696 commit 9d08b8c

16 files changed

+233
-206
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Kubebuilder DevContainer",
3-
"image": "docker.io/golang:1.23",
3+
"image": "golang:1.23",
44
"features": {
55
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
66
"ghcr.io/devcontainers/features/git:1": {}

.github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
go-version-file: go.mod
1919

2020
- name: Run linter
21-
uses: golangci/golangci-lint-action@v6
21+
uses: golangci/golangci-lint-action@v7
2222
with:
23-
version: v1.63.4
23+
install-mode: goinstall
24+
version: v2.0.2

.github/workflows/test-e2e.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
- name: Verify kind installation
2727
run: kind version
2828

29-
- name: Create kind cluster
30-
run: kind create cluster
31-
3229
- name: Running Test e2e
3330
run: |
3431
go mod tidy

.golangci.yml

Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,15 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
allow-parallel-runners: true
4-
5-
issues:
6-
# don't skip warning about doc comments
7-
# don't exclude the default set of lint
8-
exclude-use-default: false
9-
# restore some of the defaults
10-
# (fill in the rest as needed)
11-
exclude-rules:
12-
- path: "api/*"
13-
linters:
14-
- lll
15-
- path: "internal/*"
16-
linters:
17-
- dupl
18-
- lll
194
linters:
20-
disable-all: true
5+
default: none
216
enable:
7+
- copyloopvar
228
- dupl
239
- errcheck
24-
- copyloopvar
2510
- ginkgolinter
2611
- goconst
2712
- gocyclo
28-
- gofmt
29-
- goimports
30-
- gosimple
3113
- govet
3214
- importas
3315
- ineffassign
@@ -37,24 +19,56 @@ linters:
3719
- prealloc
3820
- revive
3921
- staticcheck
40-
- typecheck
4122
- unconvert
4223
- unparam
4324
- unused
44-
45-
linters-settings:
46-
revive:
25+
settings:
26+
revive:
27+
rules:
28+
- name: comment-spacings
29+
- name: import-shadowing
30+
importas:
31+
alias:
32+
- pkg: sigs.k8s.io/controller-runtime/pkg/log
33+
alias: logf
34+
- pkg: sigs.k8s.io/cluster-api/api/v1beta1
35+
alias: clusterv1
36+
- pkg: github.com/scaleway/cluster-api-provider-scaleway/api/v1alpha1
37+
alias: infrav1
38+
- pkg: k8s.io/apimachinery/pkg/api/errors
39+
alias: apierrors
40+
- pkg: k8s.io/apimachinery/pkg/util/errors
41+
alias: utilerrors
42+
exclusions:
43+
generated: lax
4744
rules:
48-
- name: comment-spacings
49-
importas:
50-
alias:
51-
- pkg: sigs.k8s.io/controller-runtime/pkg/log
52-
alias: logf
53-
- pkg: sigs.k8s.io/cluster-api/api/v1beta1
54-
alias: clusterv1
55-
- pkg: github.com/scaleway/cluster-api-provider-scaleway/api/v1alpha1
56-
alias: infrav1
57-
- pkg: k8s.io/apimachinery/pkg/api/errors
58-
alias: apierrors
59-
- pkg: k8s.io/apimachinery/pkg/util/errors
60-
alias: utilerrors
45+
- linters:
46+
- lll
47+
path: api/*
48+
- linters:
49+
- dupl
50+
- lll
51+
path: internal/*
52+
- linters:
53+
- staticcheck
54+
text: "ST1019"
55+
- linters:
56+
- staticcheck
57+
text: "ST1005"
58+
- linters:
59+
- staticcheck
60+
text: "QF1008"
61+
paths:
62+
- third_party$
63+
- builtin$
64+
- examples$
65+
formatters:
66+
enable:
67+
- gofmt
68+
- goimports
69+
exclusions:
70+
generated: lax
71+
paths:
72+
- third_party$
73+
- builtin$
74+
- examples$

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM docker.io/golang:1.23 AS builder
2+
FROM golang:1.24 AS builder
33
ARG TARGETOS
44
ARG TARGETARCH
55

Makefile

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,24 @@ test: manifests generate fmt vet setup-envtest ## Run tests.
6565
# The default setup assumes Kind is pre-installed and builds/loads the Manager Docker image locally.
6666
# CertManager is installed by default; skip with:
6767
# - CERT_MANAGER_INSTALL_SKIP=true
68-
.PHONY: test-e2e
69-
test-e2e: manifests generate fmt vet ## Run the e2e tests. Expected an isolated environment using Kind.
68+
KIND_CLUSTER ?= cluster-api-provider-scaleway-test-e2e
69+
70+
.PHONY: setup-test-e2e
71+
setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
7072
@command -v $(KIND) >/dev/null 2>&1 || { \
7173
echo "Kind is not installed. Please install Kind manually."; \
7274
exit 1; \
7375
}
74-
@$(KIND) get clusters | grep -q 'kind' || { \
75-
echo "No Kind cluster is running. Please start a Kind cluster before running the e2e tests."; \
76-
exit 1; \
77-
}
78-
go test ./test/e2e/ -v -ginkgo.v
76+
$(KIND) create cluster --name $(KIND_CLUSTER)
77+
78+
.PHONY: test-e2e
79+
test-e2e: setup-test-e2e manifests generate fmt vet ## Run the e2e tests. Expected an isolated environment using Kind.
80+
KIND_CLUSTER=$(KIND_CLUSTER) go test ./test/e2e/ -v -ginkgo.v
81+
$(MAKE) cleanup-test-e2e
82+
83+
.PHONY: cleanup-test-e2e
84+
cleanup-test-e2e: ## Tear down the Kind cluster used for e2e tests
85+
@$(KIND) delete cluster --name $(KIND_CLUSTER)
7986

8087
.PHONY: lint
8188
lint: golangci-lint ## Run golangci-lint linter
@@ -173,12 +180,12 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
173180

174181
## Tool Versions
175182
KUSTOMIZE_VERSION ?= v5.6.0
176-
CONTROLLER_TOOLS_VERSION ?= v0.17.2
183+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
177184
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
178185
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
179186
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
180187
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
181-
GOLANGCI_LINT_VERSION ?= v1.63.4
188+
GOLANGCI_LINT_VERSION ?= v2.1.0
182189

183190
.PHONY: kustomize
184191
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
@@ -206,7 +213,7 @@ $(ENVTEST): $(LOCALBIN)
206213
.PHONY: golangci-lint
207214
golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
208215
$(GOLANGCI_LINT): $(LOCALBIN)
209-
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
216+
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION))
210217

211218
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
212219
# $1 - target path with name of binary

config/crd/bases/infrastructure.cluster.x-k8s.io_scalewayclusters.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.17.2
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: scalewayclusters.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -65,10 +65,11 @@ spec:
6565
communicate with the control plane.
6666
properties:
6767
host:
68-
description: The hostname on which the API server is serving.
68+
description: host is the hostname on which the API server is serving.
69+
maxLength: 512
6970
type: string
7071
port:
71-
description: The port on which the API server is serving.
72+
description: port is the port on which the API server is serving.
7273
format: int32
7374
type: integer
7475
required:

config/crd/bases/infrastructure.cluster.x-k8s.io_scalewayclustertemplates.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.17.2
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: scalewayclustertemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -61,10 +61,13 @@ spec:
6161
used to communicate with the control plane.
6262
properties:
6363
host:
64-
description: The hostname on which the API server is serving.
64+
description: host is the hostname on which the API server
65+
is serving.
66+
maxLength: 512
6567
type: string
6668
port:
67-
description: The port on which the API server is serving.
69+
description: port is the port on which the API server
70+
is serving.
6871
format: int32
6972
type: integer
7073
required:

config/crd/bases/infrastructure.cluster.x-k8s.io_scalewaymachines.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.17.2
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: scalewaymachines.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io

0 commit comments

Comments
 (0)