Skip to content

Commit 083bc49

Browse files
Bump k8s dependencies: k8s -> v0.30.2, ctrl-run -> v0.18.4 (#673)
* Bump sigs.k8s.io/controller-runtime from 0.17.3 to 0.18.4 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.17.3 to 0.18.4. - [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.17.3...v0.18.4) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump k8s, drop support for go 1.21 * Fix build for controller-runtime breaking changes Breaking changes are in: kubernetes-sigs/controller-runtime#2783 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joel Takvorian <[email protected]>
1 parent 86dcabd commit 083bc49

File tree

341 files changed

+40154
-11640
lines changed

Some content is hidden

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

341 files changed

+40154
-11640
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
go: ['1.21','1.22']
13+
go: ['1.22']
1414
steps:
1515
- name: install make
1616
run: sudo apt-get install make

bundle/manifests/flows.netobserv.io_flowcollectors.yaml

Lines changed: 198 additions & 72 deletions
Large diffs are not rendered by default.

config/crd/bases/flows.netobserv.io_flowcollectors.yaml

Lines changed: 198 additions & 72 deletions
Large diffs are not rendered by default.

docs/FlowCollector.md

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.

go.mod

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/netobserv/network-observability-operator
22

3-
go 1.21.0
3+
go 1.22.0
44

5-
toolchain go1.21.7
5+
toolchain go1.22.4
66

77
require (
88
github.com/go-logr/logr v1.4.1
@@ -15,13 +15,13 @@ require (
1515
github.com/stretchr/testify v1.9.0
1616
go.uber.org/zap v1.27.0
1717
gopkg.in/yaml.v2 v2.4.0
18-
k8s.io/api v0.29.3
19-
k8s.io/apiextensions-apiserver v0.29.3
20-
k8s.io/apimachinery v0.29.3
21-
k8s.io/client-go v0.29.3
22-
k8s.io/kube-aggregator v0.29.3
18+
k8s.io/api v0.30.2
19+
k8s.io/apiextensions-apiserver v0.30.2
20+
k8s.io/apimachinery v0.30.2
21+
k8s.io/client-go v0.30.2
22+
k8s.io/kube-aggregator v0.30.2
2323
k8s.io/utils v0.0.0-20240310230437-4693a0247e57
24-
sigs.k8s.io/controller-runtime v0.17.3
24+
sigs.k8s.io/controller-runtime v0.18.4
2525
sigs.k8s.io/yaml v1.4.0
2626
)
2727

@@ -31,7 +31,7 @@ require (
3131
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3232
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
3333
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
34-
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
34+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
3535
github.com/fsnotify/fsnotify v1.7.0 // indirect
3636
github.com/go-logr/zapr v1.3.0 // indirect
3737
github.com/go-openapi/jsonpointer v0.19.6 // indirect
@@ -77,9 +77,8 @@ require (
7777
google.golang.org/protobuf v1.33.0 // indirect
7878
gopkg.in/inf.v0 v0.9.1 // indirect
7979
gopkg.in/yaml.v3 v3.0.1 // indirect
80-
k8s.io/component-base v0.29.3 // indirect
8180
k8s.io/klog/v2 v2.120.1 // indirect
82-
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
81+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
8382
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
8483
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
8584
)

go.sum

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
3131
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
3232
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
3333
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
34-
github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro=
35-
github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
34+
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
35+
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
36+
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
37+
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
3638
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
3739
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
3840
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
@@ -389,35 +391,33 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
389391
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
390392
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
391393
k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg=
392-
k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw=
393-
k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80=
394-
k8s.io/apiextensions-apiserver v0.29.3 h1:9HF+EtZaVpFjStakF4yVufnXGPRppWFEQ87qnO91YeI=
395-
k8s.io/apiextensions-apiserver v0.29.3/go.mod h1:po0XiY5scnpJfFizNGo6puNU6Fq6D70UJY2Cb2KwAVc=
394+
k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI=
395+
k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI=
396+
k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE=
397+
k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw=
396398
k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc=
397-
k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU=
398-
k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU=
399-
k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg=
400-
k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0=
399+
k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg=
400+
k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
401+
k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50=
402+
k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs=
401403
k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE=
402-
k8s.io/component-base v0.29.3 h1:Oq9/nddUxlnrCuuR2K/jp6aflVvc0uDvxMzAWxnGzAo=
403-
k8s.io/component-base v0.29.3/go.mod h1:Yuj33XXjuOk2BAaHsIGHhCKZQAgYKhqIxIjIr2UXYio=
404404
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
405405
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
406406
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
407407
k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
408408
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
409409
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
410-
k8s.io/kube-aggregator v0.29.3 h1:5KvTyFN8sQq2imq8tMAHWEKoE64Zg9WSMaGX78KV6ps=
411-
k8s.io/kube-aggregator v0.29.3/go.mod h1:xGJqV/SJJ1fbwTGfQLAZfwgqX1EMoaqfotDTkDrqqSk=
410+
k8s.io/kube-aggregator v0.30.2 h1:0+yk/ED6foCprY8VmkDPUhngjaAPKsNTXB/UrtvbIz0=
411+
k8s.io/kube-aggregator v0.30.2/go.mod h1:EhqCfDdxysNWXk1wRL9SEHAdo1DKl6EULQagztkBcXE=
412412
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk=
413-
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
414-
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
413+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
414+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
415415
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
416416
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
417417
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 h1:gbqbevonBh57eILzModw6mrkbwM0gQBEuevE/AaBsHY=
418418
k8s.io/utils v0.0.0-20240310230437-4693a0247e57/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
419-
sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
420-
sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
419+
sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw=
420+
sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg=
421421
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
422422
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
423423
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=

pkg/narrowcache/client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func (c *Client) callHandlers(ctx context.Context, key string, ev watch.Event) {
203203
}
204204
}
205205

206-
func (c *Client) GetSource(ctx context.Context, obj client.Object) (source.Source, error) {
206+
func (c *Client) GetSource(ctx context.Context, obj client.Object, h handler.EventHandler) (source.Source, error) {
207207
// Prepare a Source and make sure it is associated with a watch
208208
rlog := log.FromContext(ctx).WithName("narrowcache")
209209
rlog.WithValues("name", obj.GetName(), "namespace", obj.GetNamespace()).Info("Getting Source:")
@@ -223,7 +223,8 @@ func (c *Client) GetSource(ctx context.Context, obj client.Object) (source.Sourc
223223
}
224224

225225
return &NarrowSource{
226-
onStart: func(ctx context.Context, h handler.EventHandler, q workqueue.RateLimitingInterface) {
226+
handler: h,
227+
onStart: func(ctx context.Context, q workqueue.RateLimitingInterface) {
227228
c.addHandler(key, handlerOnQueue{handler: h, queue: q})
228229
},
229230
}, nil

pkg/narrowcache/source.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@ package narrowcache
22

33
import (
44
"context"
5+
"errors"
56

67
"k8s.io/client-go/util/workqueue"
78
"sigs.k8s.io/controller-runtime/pkg/handler"
8-
"sigs.k8s.io/controller-runtime/pkg/predicate"
99
"sigs.k8s.io/controller-runtime/pkg/source"
1010
)
1111

1212
type NarrowSource struct {
1313
source.Source
14-
onStart func(ctx context.Context, h handler.EventHandler, q workqueue.RateLimitingInterface)
14+
handler handler.EventHandler
15+
onStart func(ctx context.Context, q workqueue.RateLimitingInterface)
1516
}
1617

17-
func (s *NarrowSource) Start(ctx context.Context, h handler.EventHandler, q workqueue.RateLimitingInterface, _ ...predicate.Predicate) error {
18-
s.onStart(ctx, h, q)
18+
func (s *NarrowSource) Start(ctx context.Context, q workqueue.RateLimitingInterface) error {
19+
if s.handler == nil {
20+
return errors.New("must specify NarrowSource.handler")
21+
}
22+
s.onStart(ctx, q)
1923
return nil
2024
}

pkg/watchers/watcher.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,9 @@ func (w *Watcher) watch(ctx context.Context, cl *narrowcache.Client, kind flowsl
7979
// Don't register again
8080
return nil
8181
}
82-
s, err := cl.GetSource(ctx, obj)
83-
if err != nil {
84-
return err
85-
}
86-
// Note that currently, watches are never removed (they can't - cf https://github.com/kubernetes-sigs/controller-runtime/issues/1884)
87-
// This isn't a big deal here, as the number of watches that we set is very limited and not meant to grow over and over
88-
// (unless user keeps reconfiguring cert references endlessly)
89-
err = w.ctrl.Watch(
90-
s,
82+
s, err := cl.GetSource(
83+
ctx,
84+
obj,
9185
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, o client.Object) []reconcile.Request {
9286
// The watch might be registered, but inactive
9387
k := key(kind, o.GetName(), o.GetNamespace())
@@ -104,6 +98,13 @@ func (w *Watcher) watch(ctx context.Context, cl *narrowcache.Client, kind flowsl
10498
if err != nil {
10599
return err
106100
}
101+
// Note that currently, watches are never removed (they can't - cf https://github.com/kubernetes-sigs/controller-runtime/issues/1884)
102+
// This isn't a big deal here, as the number of watches that we set is very limited and not meant to grow over and over
103+
// (unless user keeps reconfiguring cert references endlessly)
104+
err = w.ctrl.Watch(s)
105+
if err != nil {
106+
return err
107+
}
107108
return nil
108109
}
109110

vendor/github.com/evanphx/json-patch/v5/internal/json/encode.go

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

vendor/github.com/evanphx/json-patch/v5/internal/json/stream.go

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

0 commit comments

Comments
 (0)