Skip to content

Commit bce356e

Browse files
committed
chore: Upgrade to k8s 1.31 and GO 1.23
Signed-off-by: Soule <[email protected]>
1 parent bb69c6c commit bce356e

19 files changed

+222
-313
lines changed

.github/workflows/checks.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Set up Go 1.x
1212
uses: actions/setup-go@v5
1313
with:
14-
go-version: '1.22'
14+
go-version: '1.23'
1515
- name: checkout
1616
uses: actions/checkout@v4
1717
- name: lint
@@ -45,7 +45,7 @@ jobs:
4545
- name: Set up Go 1.x
4646
uses: actions/setup-go@v5
4747
with:
48-
go-version: '1.22'
48+
go-version: '1.23'
4949
- name: checkout
5050
uses: actions/checkout@v4
5151
- name: check manifests
@@ -59,7 +59,7 @@ jobs:
5959
- name: Set up Go 1.x
6060
uses: actions/setup-go@v5
6161
with:
62-
go-version: '1.22'
62+
go-version: '1.23'
6363
- name: checkout
6464
uses: actions/checkout@v4
6565
- name: check go modules
@@ -73,7 +73,7 @@ jobs:
7373
- name: Set up Go 1.x
7474
uses: actions/setup-go@v5
7575
with:
76-
go-version: '1.22'
76+
go-version: '1.23'
7777
- name: checkout
7878
uses: actions/checkout@v4
7979
- name: check release-build
@@ -87,7 +87,7 @@ jobs:
8787
- name: Set up Go 1.x
8888
uses: actions/setup-go@v5
8989
with:
90-
go-version: '1.22'
90+
go-version: '1.23'
9191
- name: checkout
9292
uses: actions/checkout@v4
9393
- name: test

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ linters-settings:
3838
printf:
3939
funcs:
4040
- (github.com/rs/zerolog/zerolog.Event).Msgf
41+
gosec:
42+
excludes:
43+
- G115
4144
lll:
4245
line-length: 120
4346
misspell:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
ARG ARCH
1717

1818
# Build the manager binary
19-
FROM golang:1.22 as builder
19+
FROM golang:1.23 as builder
2020

2121
WORKDIR /workspace
2222
# Add kubectl tool

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,23 @@ GO = go
121121
# golangci-lint is used to lint go code.
122122
GOLANGCI_LINT_PKG=github.com/golangci/golangci-lint/cmd/golangci-lint
123123
GOLANGCI_LINT_BIN= golangci-lint
124-
GOLANGCI_LINT_VER = v1.55.2
124+
GOLANGCI_LINT_VER = v1.61.0
125125
GOLANGCI_LINT = $(TOOLSDIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
126126
$(GOLANGCI_LINT):
127127
$(call go-install-tool,$(GOLANGCI_LINT_PKG),$(GOLANGCI_LINT_BIN),$(GOLANGCI_LINT_VER))
128128

129129
# controller gen is used to generate manifests and code for Kubernetes controllers.
130130
CONTROLLER_GEN_PKG = sigs.k8s.io/controller-tools/cmd/controller-gen
131131
CONTROLLER_GEN_BIN = controller-gen
132-
CONTROLLER_GEN_VER = v0.14.0
132+
CONTROLLER_GEN_VER = v0.16.4
133133
CONTROLLER_GEN = $(TOOLSDIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
134134
$(CONTROLLER_GEN):
135135
$(call go-install-tool,$(CONTROLLER_GEN_PKG),$(CONTROLLER_GEN_BIN),$(CONTROLLER_GEN_VER))
136136

137137
# kustomize is used to generate manifests for OpenShift bundles and developer deployments.
138-
KUSTOMIZE_PKG = sigs.k8s.io/kustomize/kustomize/v4
138+
KUSTOMIZE_PKG = sigs.k8s.io/kustomize/kustomize/v5
139139
KUSTOMIZE_BIN = kustomize
140-
KUSTOMIZE_VER = v4.5.5
140+
KUSTOMIZE_VER = v5.5.0
141141
KUSTOMIZE = $(TOOLSDIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER)
142142
$(KUSTOMIZE):
143143
$(call go-install-tool,$(KUSTOMIZE_PKG),$(KUSTOMIZE_BIN),$(KUSTOMIZE_VER))

config/crd/bases/mellanox.com_hostdevicenetworks.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.16.4
77
name: hostdevicenetworks.mellanox.com
88
spec:
99
group: mellanox.com

config/crd/bases/mellanox.com_ipoibnetworks.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.16.4
77
name: ipoibnetworks.mellanox.com
88
spec:
99
group: mellanox.com

config/crd/bases/mellanox.com_macvlannetworks.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.16.4
77
name: macvlannetworks.mellanox.com
88
spec:
99
group: mellanox.com

config/crd/bases/mellanox.com_nicclusterpolicies.yaml

Lines changed: 19 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.16.4
77
name: nicclusterpolicies.mellanox.com
88
spec:
99
group: mellanox.com
@@ -323,11 +323,13 @@ spec:
323323
items:
324324
type: string
325325
type: array
326+
x-kubernetes-list-type: atomic
326327
required:
327328
- key
328329
- operator
329330
type: object
330331
type: array
332+
x-kubernetes-list-type: atomic
331333
matchFields:
332334
description: A list of node selector requirements by
333335
node's fields.
@@ -355,11 +357,13 @@ spec:
355357
items:
356358
type: string
357359
type: array
360+
x-kubernetes-list-type: atomic
358361
required:
359362
- key
360363
- operator
361364
type: object
362365
type: array
366+
x-kubernetes-list-type: atomic
363367
type: object
364368
x-kubernetes-map-type: atomic
365369
weight:
@@ -372,6 +376,7 @@ spec:
372376
- weight
373377
type: object
374378
type: array
379+
x-kubernetes-list-type: atomic
375380
requiredDuringSchedulingIgnoredDuringExecution:
376381
description: |-
377382
If the affinity requirements specified by this field are not met at
@@ -416,11 +421,13 @@ spec:
416421
items:
417422
type: string
418423
type: array
424+
x-kubernetes-list-type: atomic
419425
required:
420426
- key
421427
- operator
422428
type: object
423429
type: array
430+
x-kubernetes-list-type: atomic
424431
matchFields:
425432
description: A list of node selector requirements by
426433
node's fields.
@@ -448,14 +455,17 @@ spec:
448455
items:
449456
type: string
450457
type: array
458+
x-kubernetes-list-type: atomic
451459
required:
452460
- key
453461
- operator
454462
type: object
455463
type: array
464+
x-kubernetes-list-type: atomic
456465
type: object
457466
x-kubernetes-map-type: atomic
458467
type: array
468+
x-kubernetes-list-type: atomic
459469
required:
460470
- nodeSelectorTerms
461471
type: object
@@ -615,10 +625,13 @@ spec:
615625
description: The key to select.
616626
type: string
617627
name:
628+
default: ""
618629
description: |-
619630
Name of the referent.
631+
This field is effectively required, but due to backwards compatibility is
632+
allowed to be empty. Instances of this type with an empty value here are
633+
almost certainly wrong.
620634
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
621-
TODO: Add other useful fields. apiVersion, kind, uid?
622635
type: string
623636
optional:
624637
description: Specify whether the ConfigMap or its
@@ -678,10 +691,13 @@ spec:
678691
be a valid secret key.
679692
type: string
680693
name:
694+
default: ""
681695
description: |-
682696
Name of the referent.
697+
This field is effectively required, but due to backwards compatibility is
698+
allowed to be empty. Instances of this type with an empty value here are
699+
almost certainly wrong.
683700
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
684-
TODO: Add other useful fields. apiVersion, kind, uid?
685701
type: string
686702
optional:
687703
description: Specify whether the Secret or its key

config/manager/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ kind: Kustomization
2020
images:
2121
- name: controller
2222
newName: mellanox/network-operator
23+
apiVersion: kustomize.config.k8s.io/v1beta1

0 commit comments

Comments
 (0)