Skip to content

Commit 69ae35a

Browse files
committed
Bump Go dependencies and tools
1 parent 30923a5 commit 69ae35a

File tree

6 files changed

+172
-296
lines changed

6 files changed

+172
-296
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TAG := $(shell git describe --tags --always --dirty)
55
IMG ?= ghcr.io/pfnet-research/node-operation-controller:$(TAG)
66

77
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
8-
ENVTEST_K8S_VERSION = 1.25
8+
ENVTEST_K8S_VERSION = 1.30
99

1010
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
1111
ifeq (,$(shell go env GOBIN))
@@ -44,7 +44,7 @@ help: ## Display this help.
4444
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
4545

4646
CONTROLLER_GEN := $(CURDIR)/bin/controller-gen
47-
CONTROLLER_GEN_VERSION ?= v0.11.3
47+
CONTROLLER_GEN_VERSION ?= v0.16.5
4848
$(CONTROLLER_GEN): ## Download controller-gen locally if necessary.
4949
GOBIN=$(PROJECT_DIR)/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION)
5050

@@ -58,13 +58,13 @@ $(ENVTEST): ## Download envtest-setup locally if necessary.
5858
GOBIN=$(PROJECT_DIR)/bin go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
5959

6060
KUBECTL := $(CURDIR)/bin/kubectl
61-
KUBECTL_VERSION ?= v1.26.1
61+
KUBECTL_VERSION ?= v1.30.11
6262
$(KUBECTL): ## Download kubectl locally if necessary.
6363
curl -Lo $(PROJECT_DIR)/bin/kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
6464
chmod +x $(PROJECT_DIR)/bin/kubectl
6565

6666
KIND := $(CURDIR)/bin/kind
67-
KIND_VERSION ?= v0.17.0
67+
KIND_VERSION ?= v0.25.0
6868
$(KIND): ## Download kind locally if necessary.
6969
curl -Lo $(PROJECT_DIR)/bin/kind "https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-amd64"
7070
chmod +x $(PROJECT_DIR)/bin/kind

controllers/noderemediation_controller.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333
"sigs.k8s.io/controller-runtime/pkg/handler"
3434
"sigs.k8s.io/controller-runtime/pkg/log"
3535
"sigs.k8s.io/controller-runtime/pkg/reconcile"
36-
"sigs.k8s.io/controller-runtime/pkg/source"
3736
)
3837

3938
var operationRemediationOwnerKey = "operationRemediationOwner"
@@ -224,12 +223,12 @@ func (r *NodeRemediationReconciler) SetupWithManager(mgr ctrl.Manager) error {
224223
return err
225224
}
226225

227-
nodeMapFn := func(a client.Object) []reconcile.Request {
226+
nodeMapFn := func(ctx context.Context, a client.Object) []reconcile.Request {
228227
nodeName := a.GetName()
229228

230229
remediations := &nodeopsv1alpha1.NodeRemediationList{}
231230
// TODO: use MatchingFields
232-
if err := r.List(context.TODO(), remediations); err != nil {
231+
if err := r.List(ctx, remediations); err != nil {
233232
logger.Info("Failed to list NodeRemediations")
234233
return []reconcile.Request{}
235234
}
@@ -251,6 +250,6 @@ func (r *NodeRemediationReconciler) SetupWithManager(mgr ctrl.Manager) error {
251250
return ctrl.NewControllerManagedBy(mgr).
252251
For(&nodeopsv1alpha1.NodeRemediation{}).
253252
Owns(&nodeopsv1alpha1.NodeOperation{}).
254-
Watches(&source.Kind{Type: &corev1.Node{}}, handler.EnqueueRequestsFromMapFunc(nodeMapFn)).
253+
Watches(&corev1.Node{}, handler.EnqueueRequestsFromMapFunc(nodeMapFn)).
255254
Complete(r)
256255
}

controllers/noderemediationtemplate_controller.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"sigs.k8s.io/controller-runtime/pkg/handler"
3333
"sigs.k8s.io/controller-runtime/pkg/log"
3434
"sigs.k8s.io/controller-runtime/pkg/reconcile"
35-
"sigs.k8s.io/controller-runtime/pkg/source"
3635

3736
nodeopsv1alpha1 "github.com/pfnet-research/node-operation-controller/api/v1alpha1"
3837
)
@@ -177,9 +176,9 @@ func (r *NodeRemediationTemplateReconciler) SetupWithManager(mgr ctrl.Manager) e
177176
return err
178177
}
179178

180-
nodeMapFn := func(a client.Object) []reconcile.Request {
179+
nodeMapFn := func(ctx context.Context, a client.Object) []reconcile.Request {
181180
templates := &nodeopsv1alpha1.NodeRemediationTemplateList{}
182-
if err := r.List(context.TODO(), templates); err != nil {
181+
if err := r.List(ctx, templates); err != nil {
183182
logger.Info("Failed to list NodeRemediationTemplates")
184183
return []reconcile.Request{}
185184
}
@@ -205,6 +204,6 @@ func (r *NodeRemediationTemplateReconciler) SetupWithManager(mgr ctrl.Manager) e
205204
return ctrl.NewControllerManagedBy(mgr).
206205
For(&nodeopsv1alpha1.NodeRemediationTemplate{}).
207206
Owns(&nodeopsv1alpha1.NodeRemediation{}).
208-
Watches(&source.Kind{Type: &corev1.Node{}}, handler.EnqueueRequestsFromMapFunc(nodeMapFn)).
207+
Watches(&corev1.Node{}, handler.EnqueueRequestsFromMapFunc(nodeMapFn)).
209208
Complete(r)
210209
}

go.mod

+48-47
Original file line numberDiff line numberDiff line change
@@ -3,71 +3,72 @@ module github.com/pfnet-research/node-operation-controller
33
go 1.23.8
44

55
require (
6-
github.com/google/go-cmp v0.5.9
7-
github.com/onsi/ginkgo/v2 v2.6.1
8-
github.com/onsi/gomega v1.24.1
9-
github.com/stretchr/testify v1.8.0
10-
k8s.io/api v0.26.1
11-
k8s.io/apimachinery v0.26.1
12-
k8s.io/client-go v0.26.1
13-
sigs.k8s.io/controller-runtime v0.14.1
6+
github.com/google/go-cmp v0.7.0
7+
github.com/onsi/ginkgo/v2 v2.22.0
8+
github.com/onsi/gomega v1.36.1
9+
github.com/stretchr/testify v1.10.0
10+
k8s.io/api v0.31.7
11+
k8s.io/apimachinery v0.31.7
12+
k8s.io/client-go v0.31.7
13+
sigs.k8s.io/controller-runtime v0.19.7
1414
)
1515

1616
require (
1717
github.com/beorn7/perks v1.0.1 // indirect
18-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
19-
github.com/davecgh/go-spew v1.1.1 // indirect
20-
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
21-
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
22-
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
23-
github.com/fsnotify/fsnotify v1.6.0 // indirect
24-
github.com/go-logr/logr v1.2.3 // indirect
25-
github.com/go-logr/zapr v1.2.3 // indirect
26-
github.com/go-openapi/jsonpointer v0.19.5 // indirect
27-
github.com/go-openapi/jsonreference v0.20.0 // indirect
28-
github.com/go-openapi/swag v0.22.3 // indirect
18+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
19+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
20+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
21+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
22+
github.com/fsnotify/fsnotify v1.7.0 // indirect
23+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
24+
github.com/go-logr/logr v1.4.2 // indirect
25+
github.com/go-logr/zapr v1.3.0 // indirect
26+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
27+
github.com/go-openapi/jsonreference v0.20.2 // indirect
28+
github.com/go-openapi/swag v0.22.4 // indirect
29+
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
2930
github.com/gogo/protobuf v1.3.2 // indirect
3031
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
31-
github.com/golang/protobuf v1.5.2 // indirect
32-
github.com/google/gnostic v0.6.9 // indirect
32+
github.com/golang/protobuf v1.5.4 // indirect
33+
github.com/google/gnostic-models v0.6.8 // indirect
3334
github.com/google/gofuzz v1.2.0 // indirect
34-
github.com/google/uuid v1.3.0 // indirect
35-
github.com/imdario/mergo v0.3.13 // indirect
35+
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
36+
github.com/google/uuid v1.6.0 // indirect
37+
github.com/imdario/mergo v0.3.6 // indirect
3638
github.com/josharian/intern v1.0.0 // indirect
3739
github.com/json-iterator/go v1.1.12 // indirect
3840
github.com/mailru/easyjson v0.7.7 // indirect
39-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
4041
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4142
github.com/modern-go/reflect2 v1.0.2 // indirect
4243
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4344
github.com/pkg/errors v0.9.1 // indirect
44-
github.com/pmezard/go-difflib v1.0.0 // indirect
45-
github.com/prometheus/client_golang v1.14.0 // indirect
46-
github.com/prometheus/client_model v0.3.0 // indirect
47-
github.com/prometheus/common v0.39.0 // indirect
48-
github.com/prometheus/procfs v0.9.0 // indirect
45+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
46+
github.com/prometheus/client_golang v1.19.1 // indirect
47+
github.com/prometheus/client_model v0.6.1 // indirect
48+
github.com/prometheus/common v0.55.0 // indirect
49+
github.com/prometheus/procfs v0.15.1 // indirect
4950
github.com/spf13/pflag v1.0.5 // indirect
50-
go.uber.org/atomic v1.10.0 // indirect
51-
go.uber.org/multierr v1.9.0 // indirect
52-
go.uber.org/zap v1.24.0 // indirect
53-
golang.org/x/net v0.4.0 // indirect
54-
golang.org/x/oauth2 v0.3.0 // indirect
55-
golang.org/x/sys v0.3.0 // indirect
56-
golang.org/x/term v0.3.0 // indirect
57-
golang.org/x/text v0.5.0 // indirect
51+
github.com/x448/float16 v0.8.4 // indirect
52+
go.uber.org/multierr v1.11.0 // indirect
53+
go.uber.org/zap v1.26.0 // indirect
54+
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
55+
golang.org/x/net v0.30.0 // indirect
56+
golang.org/x/oauth2 v0.21.0 // indirect
57+
golang.org/x/sys v0.26.0 // indirect
58+
golang.org/x/term v0.25.0 // indirect
59+
golang.org/x/text v0.19.0 // indirect
5860
golang.org/x/time v0.3.0 // indirect
59-
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
60-
google.golang.org/appengine v1.6.7 // indirect
61-
google.golang.org/protobuf v1.28.1 // indirect
61+
golang.org/x/tools v0.26.0 // indirect
62+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
63+
google.golang.org/protobuf v1.35.1 // indirect
6264
gopkg.in/inf.v0 v0.9.1 // indirect
6365
gopkg.in/yaml.v2 v2.4.0 // indirect
6466
gopkg.in/yaml.v3 v3.0.1 // indirect
65-
k8s.io/apiextensions-apiserver v0.26.0 // indirect
66-
k8s.io/component-base v0.26.0 // indirect
67-
k8s.io/klog/v2 v2.80.1 // indirect
68-
k8s.io/kube-openapi v0.0.0-20221207184640-f3cff1453715 // indirect
69-
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
67+
k8s.io/apiextensions-apiserver v0.31.0 // indirect
68+
k8s.io/klog/v2 v2.130.1 // indirect
69+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
70+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
7071
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
71-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
72-
sigs.k8s.io/yaml v1.3.0 // indirect
72+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
73+
sigs.k8s.io/yaml v1.4.0 // indirect
7374
)

0 commit comments

Comments
 (0)