Skip to content

Commit fdf8470

Browse files
Merge pull request #366 from stuggi/golang_1.24
[golang] bump to golang 1.24
2 parents a95d6d0 + b63f5a6 commit fdf8470

File tree

62 files changed

+600
-709
lines changed

Some content is hidden

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

62 files changed

+600
-709
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-designate-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: designate
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: designate
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: designate
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: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +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
7-
- gofmt
9+
- ginkgolinter
810
- govet
11+
- gosec
12+
- errname
13+
- err113
14+
15+
formatters:
16+
enable:
17+
- gofmt
18+
919
run:
1020
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: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ endif
5050
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/designate-operator:latest
5151
IMG ?= $(DEFAULT_IMG)
5252
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
53-
ENVTEST_K8S_VERSION = 1.29
53+
ENVTEST_K8S_VERSION = 1.31
5454

5555
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
5656
ifeq (,$(shell go env GOBIN))
@@ -114,9 +114,10 @@ tidy: ## Run go mod tidy on every mod file in the repo
114114
go mod tidy
115115
cd ./api && go mod tidy
116116

117+
GOLANGCI_LINT_VERSION ?= v2.4.0
117118
.PHONY: golangci-lint
118119
golangci-lint:
119-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1
120+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
120121
$(LOCALBIN)/golangci-lint run --fix --timeout=5m
121122

122123
.PHONY: test
@@ -186,9 +187,9 @@ GINKGO ?= $(LOCALBIN)/ginkgo
186187

187188
## Tool Versions
188189
KUSTOMIZE_VERSION ?= v3.8.7
189-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
190+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
190191
OPERATOR_SDK_VERSION ?= v1.31.0
191-
GOTOOLCHAIN_VERSION ?= go1.21.0
192+
GOTOOLCHAIN_VERSION ?= go1.24.0
192193

193194
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
194195
.PHONY: kustomize
@@ -204,7 +205,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
204205
.PHONY: envtest
205206
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
206207
$(ENVTEST): $(LOCALBIN)
207-
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
208+
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
208209

209210
.PHONY: operator-sdk
210211
operator-sdk: $(OPERATOR_SDK) ## Download operator-sdk locally if necessary.

api/bases/designate.openstack.org_designateapis.yaml

Lines changed: 9 additions & 6 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: designateapis.designate.openstack.org
88
spec:
99
group: designate.openstack.org
@@ -105,7 +105,6 @@ spec:
105105
description: |-
106106
ConfigOverwrite - interface to overwrite default config files like e.g. policy.json.
107107
But can also be used to add additional files. Those get added to the service config dir in /etc/<service> .
108-
TODO: -> implement
109108
type: object
110109
networkAttachments:
111110
description: NetworkAttachments is a list of NetworkAttachment resource
@@ -144,7 +143,7 @@ spec:
144143
Annotations is an unstructured key value map stored with a resource that may be
145144
set by external tools to store and retrieve arbitrary metadata. They are not
146145
queryable and should be preserved when modifying objects.
147-
More info: http://kubernetes.io/docs/user-guide/annotations
146+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
148147
type: object
149148
labels:
150149
additionalProperties:
@@ -153,7 +152,7 @@ spec:
153152
Map of string keys and values that can be used to organize and categorize
154153
(scope and select) objects. May match selectors of replication controllers
155154
and services.
156-
More info: http://kubernetes.io/docs/user-guide/labels
155+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
157156
type: object
158157
type: object
159158
spec:
@@ -308,11 +307,9 @@ spec:
308307
Claims lists the names of resources, defined in spec.resourceClaims,
309308
that are used by this container.
310309
311-
312310
This is an alpha field and requires enabling the
313311
DynamicResourceAllocation feature gate.
314312
315-
316313
This field is immutable. It can only be set for containers.
317314
items:
318315
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
@@ -323,6 +320,12 @@ spec:
323320
the Pod where this field is used. It makes that resource available
324321
inside a container.
325322
type: string
323+
request:
324+
description: |-
325+
Request is the name chosen for a request in the referenced claim.
326+
If empty, everything from the claim is made available, otherwise
327+
only the result of this request.
328+
type: string
326329
required:
327330
- name
328331
type: object

api/bases/designate.openstack.org_designatebackendbind9s.yaml

Lines changed: 9 additions & 6 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: designatebackendbind9s.designate.openstack.org
88
spec:
99
group: designate.openstack.org
@@ -107,7 +107,6 @@ spec:
107107
description: |-
108108
ConfigOverwrite - interface to overwrite default config files like e.g. policy.json.
109109
But can also be used to add additional files. Those get added to the service config dir in /etc/<service> .
110-
TODO: -> implement
111110
type: object
112111
netUtilsImage:
113112
description: NetUtilsImage - NetUtils container image
@@ -148,7 +147,7 @@ spec:
148147
Annotations is an unstructured key value map stored with a resource that may be
149148
set by external tools to store and retrieve arbitrary metadata. They are not
150149
queryable and should be preserved when modifying objects.
151-
More info: http://kubernetes.io/docs/user-guide/annotations
150+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
152151
type: object
153152
labels:
154153
additionalProperties:
@@ -157,7 +156,7 @@ spec:
157156
Map of string keys and values that can be used to organize and categorize
158157
(scope and select) objects. May match selectors of replication controllers
159158
and services.
160-
More info: http://kubernetes.io/docs/user-guide/labels
159+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
161160
type: object
162161
type: object
163162
spec:
@@ -310,11 +309,9 @@ spec:
310309
Claims lists the names of resources, defined in spec.resourceClaims,
311310
that are used by this container.
312311
313-
314312
This is an alpha field and requires enabling the
315313
DynamicResourceAllocation feature gate.
316314
317-
318315
This field is immutable. It can only be set for containers.
319316
items:
320317
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
@@ -325,6 +322,12 @@ spec:
325322
the Pod where this field is used. It makes that resource available
326323
inside a container.
327324
type: string
325+
request:
326+
description: |-
327+
Request is the name chosen for a request in the referenced claim.
328+
If empty, everything from the claim is made available, otherwise
329+
only the result of this request.
330+
type: string
328331
required:
329332
- name
330333
type: object

0 commit comments

Comments
 (0)