Skip to content

Commit f1d55e0

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

File tree

6 files changed

+157
-153
lines changed

6 files changed

+157
-153
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

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

controllers/nicclusterpolicy_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func (r *NicClusterPolicyReconciler) SetupWithManager(mgr ctrl.Manager, setupLog
366366
// we always add object with a same(static) key to the queue to reduce
367367
// reconciliation count
368368
updateEnqueue := handler.Funcs{
369-
UpdateFunc: func(_ context.Context, e event.UpdateEvent, q workqueue.RateLimitingInterface) {
369+
UpdateFunc: func(_ context.Context, e event.UpdateEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
370370
q.Add(reconcile.Request{NamespacedName: types.NamespacedName{
371371
Name: consts.NicClusterPolicyResourceName,
372372
}})

controllers/upgrade_controller.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,30 +195,30 @@ func (r *UpgradeReconciler) removeNodeUpgradeStateAnnotations(ctx context.Contex
195195
func (r *UpgradeReconciler) SetupWithManager(mgr ctrl.Manager) error {
196196
// we always add object with a same(static) key to the queue to reduce
197197
// reconciliation count
198-
qHandler := func(q workqueue.RateLimitingInterface) {
198+
qHandler := func(q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
199199
q.Add(reconcile.Request{NamespacedName: types.NamespacedName{
200200
Namespace: "ofed-upgrade-reconcile-namespace",
201201
Name: "ofed-upgrade-reconcile-name",
202202
}})
203203
}
204204

205205
createUpdateDeleteEnqueue := handler.Funcs{
206-
CreateFunc: func(_ context.Context, e event.CreateEvent, q workqueue.RateLimitingInterface) {
206+
CreateFunc: func(_ context.Context, e event.CreateEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
207207
qHandler(q)
208208
},
209-
UpdateFunc: func(_ context.Context, e event.UpdateEvent, q workqueue.RateLimitingInterface) {
209+
UpdateFunc: func(_ context.Context, e event.UpdateEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
210210
qHandler(q)
211211
},
212-
DeleteFunc: func(_ context.Context, e event.DeleteEvent, q workqueue.RateLimitingInterface) {
212+
DeleteFunc: func(_ context.Context, e event.DeleteEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
213213
qHandler(q)
214214
},
215215
}
216216

217217
createUpdateEnqueue := handler.Funcs{
218-
CreateFunc: func(_ context.Context, e event.CreateEvent, q workqueue.RateLimitingInterface) {
218+
CreateFunc: func(_ context.Context, e event.CreateEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
219219
qHandler(q)
220220
},
221-
UpdateFunc: func(_ context.Context, e event.UpdateEvent, q workqueue.RateLimitingInterface) {
221+
UpdateFunc: func(_ context.Context, e event.UpdateEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
222222
qHandler(q)
223223
},
224224
}

go.mod

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
module github.com/Mellanox/network-operator
22

3-
go 1.22
4-
5-
toolchain go1.22.4
3+
go 1.23.2
64

75
require (
86
github.com/Masterminds/semver/v3 v3.3.0
9-
github.com/NVIDIA/k8s-operator-libs v0.0.0-20240214071211-ea58a3ada15c
7+
github.com/NVIDIA/k8s-operator-libs v0.0.0-20240919061528-c2b0d1774947
108
github.com/caarlos0/env/v6 v6.10.1
119
github.com/containers/image/v5 v5.32.2
1210
github.com/go-logr/logr v1.4.2
1311
github.com/google/go-containerregistry v0.20.2
14-
github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20231129213221-4fdaa32ee934
12+
github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20241001163006-808e3548ee86
1513
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.4
1614
github.com/onsi/ginkgo/v2 v2.20.2
1715
github.com/onsi/gomega v1.34.2
18-
github.com/openshift/api v0.0.0-20231120222239-b86761094ee3
16+
github.com/openshift/api v0.0.0-20241015143726-5afd6c371db4
1917
github.com/pkg/errors v0.9.1
2018
github.com/stretchr/testify v1.9.0
2119
github.com/xeipuuv/gojsonschema v1.2.0
2220
gopkg.in/yaml.v3 v3.0.1
23-
k8s.io/api v0.29.9
24-
k8s.io/apimachinery v0.29.9
25-
k8s.io/client-go v0.29.9
26-
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
27-
sigs.k8s.io/controller-runtime v0.17.6
21+
k8s.io/api v0.31.1
22+
k8s.io/apimachinery v0.31.1
23+
k8s.io/client-go v0.31.1
24+
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6
25+
sigs.k8s.io/controller-runtime v0.19.0
2826
sigs.k8s.io/yaml v1.4.0
2927
)
3028

3129
require (
3230
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
3331
github.com/MakeNowJust/heredoc v1.0.0 // indirect
3432
github.com/beorn7/perks v1.0.1 // indirect
35-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
36-
github.com/chai2010/gettext-go v1.0.2 // indirect
33+
github.com/blang/semver/v4 v4.0.0 // indirect
34+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
35+
github.com/chai2010/gettext-go v1.0.3 // indirect
3736
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
3837
github.com/containers/storage v1.55.0 // indirect
3938
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
40-
github.com/docker/cli v27.1.1+incompatible // indirect
39+
github.com/docker/cli v27.3.1+incompatible // indirect
4140
github.com/docker/distribution v2.8.3+incompatible // indirect
4241
github.com/docker/docker-credential-helpers v0.8.2 // indirect
43-
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
44-
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
45-
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
42+
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
43+
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
44+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
4645
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
4746
github.com/fsnotify/fsnotify v1.7.0 // indirect
47+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
4848
github.com/go-errors/errors v1.5.1 // indirect
4949
github.com/go-logr/zapr v1.3.0 // indirect
5050
github.com/go-openapi/jsonpointer v0.21.0 // indirect
@@ -54,25 +54,25 @@ require (
5454
github.com/gogo/protobuf v1.3.2 // indirect
5555
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
5656
github.com/golang/protobuf v1.5.4 // indirect
57-
github.com/google/btree v1.1.2 // indirect
57+
github.com/google/btree v1.1.3 // indirect
5858
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
5959
github.com/google/go-cmp v0.6.0 // indirect
6060
github.com/google/gofuzz v1.2.0 // indirect
6161
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect
6262
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
6363
github.com/google/uuid v1.6.0 // indirect
64-
github.com/gorilla/websocket v1.5.0 // indirect
64+
github.com/gorilla/websocket v1.5.3 // indirect
6565
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
6666
github.com/imdario/mergo v0.3.16 // indirect
6767
github.com/inconshreveable/mousetrap v1.1.0 // indirect
6868
github.com/josharian/intern v1.0.0 // indirect
6969
github.com/json-iterator/go v1.1.12 // indirect
70-
github.com/klauspost/compress v1.17.9 // indirect
70+
github.com/klauspost/compress v1.17.11 // indirect
7171
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
7272
github.com/mailru/easyjson v0.7.7 // indirect
7373
github.com/mitchellh/go-homedir v1.1.0 // indirect
7474
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
75-
github.com/moby/spdystream v0.2.0 // indirect
75+
github.com/moby/spdystream v0.5.0 // indirect
7676
github.com/moby/term v0.5.0 // indirect
7777
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
7878
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -83,44 +83,44 @@ require (
8383
github.com/opencontainers/image-spec v1.1.0 // indirect
8484
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
8585
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
86-
github.com/prometheus/client_golang v1.19.0 // indirect
87-
github.com/prometheus/client_model v0.6.0 // indirect
88-
github.com/prometheus/common v0.51.1 // indirect
86+
github.com/prometheus/client_golang v1.20.5 // indirect
87+
github.com/prometheus/client_model v0.6.1 // indirect
88+
github.com/prometheus/common v0.60.0 // indirect
8989
github.com/prometheus/procfs v0.15.1 // indirect
9090
github.com/russross/blackfriday/v2 v2.1.0 // indirect
9191
github.com/sirupsen/logrus v1.9.3 // indirect
92-
github.com/spf13/cobra v1.8.0 // indirect
92+
github.com/spf13/cobra v1.8.1 // indirect
9393
github.com/spf13/pflag v1.0.5 // indirect
9494
github.com/stretchr/objx v0.5.2 // indirect
95-
github.com/vbatts/tar-split v0.11.5 // indirect
95+
github.com/vbatts/tar-split v0.11.6 // indirect
96+
github.com/x448/float16 v0.8.4 // indirect
9697
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
9798
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
9899
github.com/xlab/treeprint v1.2.0 // indirect
99-
go.starlark.net v0.0.0-20231101134539-556fd59b42f6 // indirect
100100
go.uber.org/multierr v1.11.0 // indirect
101-
go.uber.org/zap v1.26.0 // indirect
102-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
103-
golang.org/x/net v0.28.0 // indirect
104-
golang.org/x/oauth2 v0.22.0 // indirect
101+
go.uber.org/zap v1.27.0 // indirect
102+
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
103+
golang.org/x/net v0.30.0 // indirect
104+
golang.org/x/oauth2 v0.23.0 // indirect
105105
golang.org/x/sync v0.8.0 // indirect
106-
golang.org/x/sys v0.24.0 // indirect
107-
golang.org/x/term v0.23.0 // indirect
108-
golang.org/x/text v0.17.0 // indirect
109-
golang.org/x/time v0.4.0 // indirect
110-
golang.org/x/tools v0.24.0 // indirect
106+
golang.org/x/sys v0.26.0 // indirect
107+
golang.org/x/term v0.25.0 // indirect
108+
golang.org/x/text v0.19.0 // indirect
109+
golang.org/x/time v0.7.0 // indirect
110+
golang.org/x/tools v0.26.0 // indirect
111111
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
112-
google.golang.org/protobuf v1.34.1 // indirect
113-
gopkg.in/evanphx/json-patch.v5 v5.7.0 // indirect
112+
google.golang.org/protobuf v1.35.1 // indirect
113+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
114114
gopkg.in/inf.v0 v0.9.1 // indirect
115115
gopkg.in/yaml.v2 v2.4.0 // indirect
116-
k8s.io/apiextensions-apiserver v0.29.2 // indirect
117-
k8s.io/cli-runtime v0.29.1 // indirect
118-
k8s.io/component-base v0.29.2 // indirect
119-
k8s.io/klog/v2 v2.110.1 // indirect
120-
k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e // indirect
121-
k8s.io/kubectl v0.29.1 // indirect
122-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
123-
sigs.k8s.io/kustomize/api v0.15.0 // indirect
124-
sigs.k8s.io/kustomize/kyaml v0.15.0 // indirect
116+
k8s.io/apiextensions-apiserver v0.31.1 // indirect
117+
k8s.io/cli-runtime v0.31.1 // indirect
118+
k8s.io/component-base v0.31.1 // indirect
119+
k8s.io/klog/v2 v2.130.1 // indirect
120+
k8s.io/kube-openapi v0.0.0-20241009091222-67ed5848f094 // indirect
121+
k8s.io/kubectl v0.31.1 // indirect
122+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
123+
sigs.k8s.io/kustomize/api v0.18.0 // indirect
124+
sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect
125125
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
126126
)

0 commit comments

Comments
 (0)