Skip to content

Commit 7d54e7c

Browse files
Merge pull request #375 from stuggi/golang_1.24
[golang] bump to golang 1.24
2 parents 7873da0 + 48ddff9 commit 7d54e7c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+326
-403
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-swift-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
1616
with:
1717
operator_name: swift
18-
go_version: 1.21.x
18+
go_version: 1.24.x
1919
operator_sdk_version: 1.31.0
2020
secrets:
2121
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: swift
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: swift
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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +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
11+
- gosec
12+
- errname
13+
- err113
14+
15+
formatters:
16+
enable:
17+
- gofmt
18+
1019
run:
1120
timeout: 5m

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ repos:
4242
- id: go-mod-tidy
4343

4444
- repo: https://github.com/golangci/golangci-lint
45-
rev: v1.59.1
45+
rev: v2.4.0
4646
hooks:
4747
- id: golangci-lint-full
4848
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

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ OPERATOR_SDK_VERSION ?= v1.31.0
5454
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/swift-operator:latest
5555
IMG ?= $(DEFAULT_IMG)
5656
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
57-
ENVTEST_K8S_VERSION = 1.29.0
57+
ENVTEST_K8S_VERSION = 1.31
5858

5959
# Set minimum Go version
60-
GOTOOLCHAIN_VERSION ?= go1.21.0
60+
GOTOOLCHAIN_VERSION ?= go1.24.0
6161

6262
GINKGO ?= $(LOCALBIN)/ginkgo
6363

@@ -121,9 +121,10 @@ tidy: ## Run go mod tidy on every mod file in the repo
121121
go mod tidy
122122
cd ./api && go mod tidy
123123

124+
GOLANGCI_LINT_VERSION ?= v2.4.0
124125
.PHONY: golangci-lint
125126
golangci-lint:
126-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1
127+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
127128
$(LOCALBIN)/golangci-lint run --fix --verbose
128129

129130
PROCS?=$(shell expr $(shell nproc --ignore 2) / 2)
@@ -196,7 +197,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
196197

197198
## Tool Versions
198199
KUSTOMIZE_VERSION ?= v3.8.7
199-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
200+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
200201

201202
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
202203
.PHONY: kustomize
@@ -217,7 +218,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
217218
.PHONY: envtest
218219
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
219220
$(ENVTEST): $(LOCALBIN)
220-
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
221+
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
221222

222223
.PHONY: ginkgo
223224
ginkgo: $(GINKGO) ## Download ginkgo locally if necessary.

api/bases/swift.openstack.org_swiftproxies.yaml

Lines changed: 3 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.14.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: swiftproxies.swift.openstack.org
88
spec:
99
group: swift.openstack.org
@@ -117,7 +117,7 @@ spec:
117117
Annotations is an unstructured key value map stored with a resource that may be
118118
set by external tools to store and retrieve arbitrary metadata. They are not
119119
queryable and should be preserved when modifying objects.
120-
More info: http://kubernetes.io/docs/user-guide/annotations
120+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
121121
type: object
122122
labels:
123123
additionalProperties:
@@ -126,7 +126,7 @@ spec:
126126
Map of string keys and values that can be used to organize and categorize
127127
(scope and select) objects. May match selectors of replication controllers
128128
and services.
129-
More info: http://kubernetes.io/docs/user-guide/labels
129+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
130130
type: object
131131
type: object
132132
spec:

api/bases/swift.openstack.org_swiftrings.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: swiftrings.swift.openstack.org
88
spec:
99
group: swift.openstack.org

0 commit comments

Comments
 (0)