Skip to content

Commit 21d8ccf

Browse files
Merge pull request #318 from stuggi/golang_1.24
[golang] bump to golang 1.24
2 parents 436952e + 1c22681 commit 21d8ccf

28 files changed

+190
-299
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: tools
33
namespace: openstack-k8s-operators
4-
tag: ci-build-root-golang-1.21-sdk-1.31
4+
tag: ci-build-root-golang-1.24-sdk-1.31

.github/workflows/build-openstack-baremetal-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
needs: [build-openstack-baremetal-operator-agent]
2727
with:
2828
operator_name: openstack-baremetal
29-
go_version: 1.21.x
29+
go_version: 1.24.x
3030
operator_sdk_version: 1.31.0
3131
secrets:
3232
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}

.github/workflows/force-bump-pr-manual.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ jobs:
99
with:
1010
operator_name: openstack-baremetal
1111
branch_name: ${{ github.ref_name }}
12+
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.31
1213
secrets:
1314
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}

.github/workflows/force-bump-pr-scheduled.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ jobs:
1010
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/force-bump-branches.yaml@main
1111
with:
1212
operator_name: openstack-baremetal
13+
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.31
1314
secrets:
1415
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}

.golangci.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
version: 2
2+
13
linters:
24
# Enable specific linter
35
# https://golangci-lint.run/usage/linters/#enabled-by-default
46
enable:
57
- errorlint
68
- revive
79
- ginkgolinter
8-
- gofmt
910
- govet
1011
- gosec
1112
- errname
1213
- err113
14+
15+
formatters:
16+
enable:
17+
- gofmt
18+
1319
run:
1420
timeout: 5m

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
- id: go-mod-tidy
3737

3838
- repo: https://github.com/golangci/golangci-lint
39-
rev: v1.59.1
39+
rev: v2.4.0
4040
hooks:
4141
- id: golangci-lint-full
4242
args: ["-v"]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
1+
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.24
22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
33

44
# Build the manager binary

Dockerfile.agent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
1+
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.24
22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
33

44
# Build the manager binary

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ OPERATOR_SDK_VERSION ?= v1.31.0
5656
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/openstack-baremetal-operator:latest
5757
IMG ?= $(DEFAULT_IMG)
5858
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
59-
ENVTEST_K8S_VERSION = 1.29
59+
ENVTEST_K8S_VERSION = 1.31
6060

6161
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6262
ifeq (,$(shell go env GOBIN))
@@ -86,7 +86,7 @@ SHELL = /usr/bin/env bash -o pipefail
8686
# Extra vars which will be passed to the Docker-build
8787
DOCKER_BUILD_ARGS ?=
8888

89-
GOTOOLCHAIN_VERSION ?= go1.21.0
89+
GOTOOLCHAIN_VERSION ?= go1.24.0
9090

9191
.PHONY: all
9292
all: build
@@ -219,7 +219,7 @@ GINKGO ?= $(LOCALBIN)/ginkgo
219219

220220
## Tool Versions
221221
KUSTOMIZE_VERSION ?= v3.8.7
222-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
222+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
223223

224224
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
225225
.PHONY: kustomize
@@ -240,7 +240,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
240240
.PHONY: envtest
241241
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
242242
$(ENVTEST): $(LOCALBIN)
243-
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
243+
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
244244

245245
.PHONY: operator-sdk
246246
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk
@@ -347,9 +347,10 @@ govet: get-ci-tools
347347
# Run go test against code
348348
gotest: test
349349

350+
GOLANGCI_LINT_VERSION ?= v2.4.0
350351
.PHONY: golangci-lint
351352
golangci-lint:
352-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1
353+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
353354
$(LOCALBIN)/golangci-lint run --fix
354355

355356
.PHONY: vulncheck

api/bases/baremetal.openstack.org_openstackbaremetalsets.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.14.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: openstackbaremetalsets.baremetal.openstack.org
88
spec:
99
group: baremetal.openstack.org

0 commit comments

Comments
 (0)