Skip to content

Commit d57e453

Browse files
Bump sigs.k8s.io/controller-runtime from 0.20.4 to 0.21.0 (#551)
* Bump sigs.k8s.io/controller-runtime from 0.20.4 to 0.21.0 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.20.4 to 0.21.0. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.20.4...v0.21.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.21.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * fix deprecations --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: bakito <[email protected]>
1 parent 4836ac0 commit d57e453

File tree

6 files changed

+22
-21
lines changed

6 files changed

+22
-21
lines changed

.toolbox.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TB_LOCALDIR ?= $(shell which cygpath > /dev/null 2>&1 && cygpath -m $$(pwd) || p
66
## Location to install dependencies to
77
TB_LOCALBIN ?= $(TB_LOCALDIR)/bin
88
$(TB_LOCALBIN):
9-
mkdir -p $(TB_LOCALBIN)
9+
if [ ! -e $(TB_LOCALBIN) ]; then mkdir -p $(TB_LOCALBIN); fi
1010

1111
## Tool Binaries
1212
TB_GINKGO ?= $(TB_LOCALBIN)/ginkgo
@@ -17,10 +17,10 @@ TB_MOCKGEN ?= $(TB_LOCALBIN)/mockgen
1717
TB_SEMVER ?= $(TB_LOCALBIN)/semver
1818

1919
## Tool Versions
20-
TB_GOLANGCI_LINT_VERSION ?= v2.0.1
21-
TB_GORELEASER_VERSION ?= v2.8.1
20+
TB_GOLANGCI_LINT_VERSION ?= v2.1.6
21+
TB_GORELEASER_VERSION ?= v2.9.0
2222
TB_HELM_DOCS_VERSION ?= v1.14.2
23-
TB_MOCKGEN_VERSION ?= v0.5.0
23+
TB_MOCKGEN_VERSION ?= v0.5.2
2424
TB_SEMVER_VERSION ?= v1.1.3
2525

2626
## Tool Installer

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func Setup() *Main {
7676
LeaderElectionNamespace: namespace,
7777
LeaderElectionResourceLock: cfg.LeaderElectionResourceLock,
7878
LeaderElectionReleaseOnCancel: true,
79-
79+
8080
Cache: crtlcache.Options{
8181
DefaultNamespaces: map[string]crtlcache.Config{
8282
namespace: {},

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
k8s.io/apimachinery v0.33.1
2222
k8s.io/client-go v0.33.1
2323
k8s.io/klog/v2 v2.130.1
24-
sigs.k8s.io/controller-runtime v0.20.4
24+
sigs.k8s.io/controller-runtime v0.21.0
2525
)
2626

2727
require (
@@ -87,7 +87,7 @@ require (
8787
gopkg.in/inf.v0 v0.9.1 // indirect
8888
gopkg.in/yaml.v2 v2.4.0 // indirect
8989
gopkg.in/yaml.v3 v3.0.1 // indirect
90-
k8s.io/apiextensions-apiserver v0.32.1 // indirect
90+
k8s.io/apiextensions-apiserver v0.33.0 // indirect
9191
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
9292
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
9393
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect

go.sum

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
22
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
3+
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
4+
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
35
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
46
github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
57
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
@@ -115,9 +117,8 @@ github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6
115117
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
116118
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
117119
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
120+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
118121
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
119-
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
120-
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
121122
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
122123
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
123124
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
@@ -235,8 +236,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
235236
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
236237
k8s.io/api v0.33.1 h1:tA6Cf3bHnLIrUK4IqEgb2v++/GYUtqiu9sRVk3iBXyw=
237238
k8s.io/api v0.33.1/go.mod h1:87esjTn9DRSRTD4fWMXamiXxJhpOIREjWOSjsW1kEHw=
238-
k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw=
239-
k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto=
239+
k8s.io/apiextensions-apiserver v0.33.0 h1:d2qpYL7Mngbsc1taA4IjJPRJ9ilnsXIrndH+r9IimOs=
240+
k8s.io/apiextensions-apiserver v0.33.0/go.mod h1:VeJ8u9dEEN+tbETo+lFkwaaZPg6uFKLGj5vyNEwwSzc=
240241
k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4=
241242
k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
242243
k8s.io/client-go v0.33.1 h1:ZZV/Ks2g92cyxWkRRnfUDsnhNn28eFpt26aGc8KbXF4=
@@ -249,8 +250,8 @@ k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6J
249250
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
250251
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
251252
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
252-
sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU=
253-
sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY=
253+
sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
254+
sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
254255
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
255256
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
256257
sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=

pkg/controller/controller_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"os"
77
"path/filepath"
8+
"time"
89

910
"github.com/bakito/batch-job-controller/pkg/config"
1011
mock_client "github.com/bakito/batch-job-controller/pkg/mocks/client"
@@ -108,7 +109,7 @@ var _ = Describe("Controller", func() {
108109
result, err := r.Reconcile(ctx, ctrl.Request{})
109110
Ω(err).ShouldNot(HaveOccurred())
110111
Ω(result).ShouldNot(BeNil())
111-
Ω(result.Requeue).Should(BeFalse())
112+
Ω(result.RequeueAfter).Should(Equal(time.Duration(0)))
112113
})
113114
It("should return an error", func() {
114115
mockSink.EXPECT().WithValues(gm.Any()).Return(mockSink)
@@ -118,7 +119,7 @@ var _ = Describe("Controller", func() {
118119
result, err := r.Reconcile(ctx, ctrl.Request{})
119120
Ω(err).Should(HaveOccurred())
120121
Ω(result).ShouldNot(BeNil())
121-
Ω(result.Requeue).Should(BeFalse())
122+
Ω(result.RequeueAfter).Should(Equal(time.Duration(0)))
122123
})
123124
It("should update controller on pod succeeded with logs of 2 containers", func() {
124125
cfg.SavePodLog = true
@@ -145,7 +146,7 @@ var _ = Describe("Controller", func() {
145146
result, err := r.Reconcile(ctx, ctrl.Request{})
146147
Ω(err).ShouldNot(HaveOccurred())
147148
Ω(result).ShouldNot(BeNil())
148-
Ω(result.Requeue).Should(BeFalse())
149+
Ω(result.RequeueAfter).Should(Equal(time.Duration(0)))
149150
files, err := os.ReadDir(filepath.Join(cfg.ReportDirectory, executionID))
150151
Ω(err).ShouldNot(HaveOccurred())
151152
Ω(files).Should(HaveLen(2))
@@ -165,7 +166,7 @@ var _ = Describe("Controller", func() {
165166
result, err := r.Reconcile(ctx, ctrl.Request{})
166167
Ω(err).ShouldNot(HaveOccurred())
167168
Ω(result).ShouldNot(BeNil())
168-
Ω(result.Requeue).Should(BeFalse())
169+
Ω(result.RequeueAfter).Should(Equal(time.Duration(0)))
169170
})
170171
It("should return error on update controller error", func() {
171172
mockController.EXPECT().Config().Return(cfg)
@@ -183,7 +184,7 @@ var _ = Describe("Controller", func() {
183184
result, err := r.Reconcile(ctx, ctrl.Request{})
184185
Ω(err).Should(HaveOccurred())
185186
Ω(result).ShouldNot(BeNil())
186-
Ω(result.Requeue).Should(BeFalse())
187+
Ω(result.RequeueAfter).Should(Equal(time.Duration(0)))
187188
})
188189
})
189190
})

pkg/mocks/client/mock.go

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)