Skip to content

Commit 18c08ce

Browse files
Merge pull request #740 from stuggi/golang_1.24
[golang] bump to golang 1.24
2 parents 5152878 + 6dd1a5f commit 18c08ce

Some content is hidden

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

59 files changed

+666
-687
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-telemetry-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: telemetry
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: telemetry
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: telemetry
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
@@ -63,7 +63,7 @@ repos:
6363
entry: bashate --error . --ignore=E006,E040,E011,E020,E012
6464

6565
- repo: https://github.com/golangci/golangci-lint
66-
rev: v1.59.1
66+
rev: v2.4.0
6767
hooks:
6868
- id: golangci-lint-full
6969
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ OPERATOR_SDK_VERSION ?= v1.31.0
5454
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/telemetry-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
57+
ENVTEST_K8S_VERSION = 1.31
5858

5959
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6060
ifeq (,$(shell go env GOBIN))
@@ -198,8 +198,8 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
198198

199199
## Tool Versions
200200
KUSTOMIZE_VERSION ?= v3.8.7
201-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
202-
GOTOOLCHAIN_VERSION ?= go1.21.0
201+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
202+
GOTOOLCHAIN_VERSION ?= go1.24.0
203203

204204
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
205205
.PHONY: kustomize
@@ -220,7 +220,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
220220
.PHONY: envtest
221221
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
222222
$(ENVTEST): $(LOCALBIN)
223-
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
223+
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
224224

225225
.PHONY: operator-sdk
226226
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk

api/bases/telemetry.openstack.org_autoscalings.yaml

Lines changed: 7 additions & 5 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: autoscalings.telemetry.openstack.org
88
spec:
99
group: telemetry.openstack.org
@@ -95,7 +95,6 @@ spec:
9595
description: |-
9696
ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json.
9797
But can also be used to add additional files. Those get added to the service config dir in /etc/<service> .
98-
TODO: -> implement
9998
type: object
10099
evaluatorImage:
101100
type: string
@@ -143,7 +142,7 @@ spec:
143142
Annotations is an unstructured key value map stored with a resource that may be
144143
set by external tools to store and retrieve arbitrary metadata. They are not
145144
queryable and should be preserved when modifying objects.
146-
More info: http://kubernetes.io/docs/user-guide/annotations
145+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
147146
type: object
148147
labels:
149148
additionalProperties:
@@ -152,7 +151,7 @@ spec:
152151
Map of string keys and values that can be used to organize and categorize
153152
(scope and select) objects. May match selectors of replication controllers
154153
and services.
155-
More info: http://kubernetes.io/docs/user-guide/labels
154+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
156155
type: object
157156
type: object
158157
spec:
@@ -395,10 +394,13 @@ spec:
395394
valid secret key.
396395
type: string
397396
name:
397+
default: ""
398398
description: |-
399399
Name of the referent.
400+
This field is effectively required, but due to backwards compatibility is
401+
allowed to be empty. Instances of this type with an empty value here are
402+
almost certainly wrong.
400403
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
401-
TODO: Add other useful fields. apiVersion, kind, uid?
402404
type: string
403405
optional:
404406
description: Specify whether the Secret or its key must be defined

api/bases/telemetry.openstack.org_ceilometers.yaml

Lines changed: 1 addition & 2 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: ceilometers.telemetry.openstack.org
88
spec:
99
group: telemetry.openstack.org
@@ -133,7 +133,6 @@ spec:
133133
description: |-
134134
ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json.
135135
But can also be used to add additional files. Those get added to the service config dir in /etc/<service> .
136-
TODO: -> implement
137136
type: object
138137
ipmiImage:
139138
type: string

0 commit comments

Comments
 (0)