Skip to content

Commit 6c5b39a

Browse files
committed
fix build issues caused by k8s rebase to 1.30.2
- implement GetOperatorStateWithQuorum() for v1helpers.OperatorClient interface which was added in openshift/library-go here [0] - applyconfigv1.NetworkStatus().WithConditions() now requires metav1.ConditionApplyConfiguration instead of metav1.Condition, which came in with the client-go 1.30 rebase here [1] - using new lib location for feature gates "openshift/api/features" - refactor controller-runtime Watch() calls to handle new generics support [2] - moved RotatedSigningCASecret.JiraComponent to RotatedSigningCASecret.AdditionalAnnotations.JiraComponent from here [3] - added dummy path to apimachinery validation.IsValidIP() as it was added as an argument here [4]. not relevant to the the call in this case. - bumped k8s.io/component-base to v0.31.0-alpha.2 to get past a breaking issue with prometheus using a breaking type from 0.30.2 - the version of googleapis/api/expr/v1alpha1 that is brought in with github.com/google/cel-go with anything newer than v0.17.8 no longer includes GetConstExpr() so pinning that lib to v0.17.8 [0] openshift/library-go@bd5e34c [1] openshift/client-go@792100e#diff-233949a4a2a7ca43d091c935b04748464200784e5377366d574945d3fd06ed89R76 [2] kubernetes-sigs/controller-runtime#2783 [3] openshift/library-go@df7ff42 [4] openshift/kubernetes-apimachinery@89b9414 Signed-off-by: Jamo Luhrsen <[email protected]>
1 parent 36485e9 commit 6c5b39a

File tree

757 files changed

+31093
-23575
lines changed

Some content is hidden

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

757 files changed

+31093
-23575
lines changed

go.mod

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ require (
2121
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect
2222
golang.org/x/net v0.26.0
2323
gopkg.in/yaml.v2 v2.4.0 // indirect
24-
k8s.io/api v0.30.2
25-
k8s.io/apimachinery v0.30.2
24+
k8s.io/api v0.31.0-alpha.2
25+
k8s.io/apimachinery v0.31.0-alpha.2 // replaced with v0.30.2 in replace() block below
2626
k8s.io/code-generator v0.30.2
27-
k8s.io/component-base v0.30.2
27+
k8s.io/component-base v0.31.0-alpha.2 // v0.30.2 uses outdated and build breaking type from prometheus. update in v0.31
2828
k8s.io/klog/v2 v2.130.1
2929
k8s.io/kube-proxy v0.30.2
3030
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0
31-
sigs.k8s.io/controller-runtime v0.16.0
31+
sigs.k8s.io/controller-runtime v0.18.4
3232
)
3333

3434
require (
@@ -114,13 +114,13 @@ require (
114114
github.com/openshift/library-go v0.0.0-20240621150525-4bb4238aef81
115115
github.com/openshift/machine-config-operator v0.0.1-0.20231002195040-a2469941c0dc
116116
k8s.io/apiextensions-apiserver v0.30.2
117-
k8s.io/client-go v0.30.2
117+
k8s.io/client-go v0.31.0-alpha.2
118118
)
119119

120120
require (
121121
github.com/Masterminds/semver/v3 v3.2.1 // indirect
122122
github.com/ajeddeloh/go-json v0.0.0-20200220154158-5ae607161559 // indirect
123-
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
123+
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
124124
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
125125
github.com/aws/aws-sdk-go v1.44.204 // indirect
126126
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
@@ -133,15 +133,14 @@ require (
133133
github.com/coreos/ignition/v2 v2.15.0 // indirect
134134
github.com/coreos/vcontext v0.0.0-20230201181013-d72178a18687 // indirect
135135
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
136-
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
136+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
137137
github.com/go-logr/stdr v1.2.2 // indirect
138138
github.com/google/btree v1.1.2 // indirect
139139
github.com/google/cel-go v0.20.1 // indirect
140140
github.com/google/gnostic-models v0.6.8 // indirect
141141
github.com/gorilla/websocket v1.5.3 // indirect
142142
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
143143
github.com/onsi/ginkgo v1.16.5 // indirect
144-
github.com/onsi/ginkgo/v2 v2.17.3 // indirect
145144
github.com/shopspring/decimal v1.3.1 // indirect
146145
github.com/spf13/cast v1.6.0 // indirect
147146
github.com/stoewer/go-strcase v1.3.0 // indirect
@@ -153,8 +152,14 @@ require (
153152
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
154153
google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d // indirect
155154
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect
155+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
156156
k8s.io/apiserver v0.30.2 // indirect
157157
k8s.io/gengo/v2 v2.0.0-20240404160639-a0386bf69313 // indirect
158158
k8s.io/kms v0.30.2 // indirect
159159
k8s.io/kube-aggregator v0.30.1 // indirect
160160
)
161+
162+
replace (
163+
github.com/google/cel-go => github.com/google/cel-go v0.17.8
164+
k8s.io/apimachinery => k8s.io/apimachinery v0.30.2
165+
)

go.sum

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo
3131
github.com/ajeddeloh/go-json v0.0.0-20170920214419-6a2fe990e083/go.mod h1:otnto4/Icqn88WCcM4bhIJNSgsh9VLBuspyyCfvof9c=
3232
github.com/ajeddeloh/go-json v0.0.0-20200220154158-5ae607161559 h1:4SPQljF/GJ8Q+QlCWMWxRBepub4DresnOm4eI2ebFGc=
3333
github.com/ajeddeloh/go-json v0.0.0-20200220154158-5ae607161559/go.mod h1:otnto4/Icqn88WCcM4bhIJNSgsh9VLBuspyyCfvof9c=
34-
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
35-
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
34+
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18=
35+
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
3636
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
3737
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
3838
github.com/ashcrow/osrelease v0.0.0-20180626175927-9b292693c55c h1:icme0QhxrgZOxTBnT6K8dfGLwbKWSOVwPB95XTbo8Ws=
@@ -94,8 +94,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
9494
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
9595
github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls=
9696
github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
97-
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
98-
github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
97+
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
98+
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
9999
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
100100
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
101101
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
@@ -159,8 +159,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
159159
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
160160
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
161161
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
162-
github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84=
163-
github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg=
162+
github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto=
163+
github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY=
164164
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
165165
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
166166
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -208,7 +208,6 @@ github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
208208
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
209209
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
210210
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
211-
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
212211
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
213212
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
214213
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
@@ -252,8 +251,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
252251
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
253252
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
254253
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
255-
github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU=
256-
github.com/onsi/ginkgo/v2 v2.17.3/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc=
254+
github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g=
255+
github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc=
257256
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
258257
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
259258
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
@@ -269,7 +268,6 @@ github.com/openshift/library-go v0.0.0-20240621150525-4bb4238aef81/go.mod h1:PdA
269268
github.com/openshift/machine-config-operator v0.0.1-0.20231002195040-a2469941c0dc h1:m8c26gPEv0p621926Kl26kYQvnkOrW7pOirvYzORn24=
270269
github.com/openshift/machine-config-operator v0.0.1-0.20231002195040-a2469941c0dc/go.mod h1:ftCpVtU6Q31exB0DTBn9s2eu90RJESOSisNAruWkvcE=
271270
github.com/pin/tftp v2.1.0+incompatible/go.mod h1:xVpZOMCXTy+A5QMjEVN0Glwa1sUvaJhFXbr/aAxuxGY=
272-
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
273271
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
274272
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
275273
github.com/pkg/profile v1.3.0 h1:OQIvuDgm00gWVWGTf4m4mCt6W1/0YqU7Ntg0mySWgaI=
@@ -612,6 +610,8 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8
612610
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
613611
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
614612
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
613+
gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
614+
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
615615
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
616616
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
617617
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
@@ -635,20 +635,20 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
635635
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
636636
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
637637
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
638-
k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI=
639-
k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI=
638+
k8s.io/api v0.31.0-alpha.2 h1:azMbpAFERqtGmgDtg/f7efnxgPBW+8ieyHNKxT97EMI=
639+
k8s.io/api v0.31.0-alpha.2/go.mod h1:S1X5UjUV8NZmR1vmKIkUpruhr0AWAvocZVZ5zxKMvi4=
640640
k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE=
641641
k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw=
642642
k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg=
643643
k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
644644
k8s.io/apiserver v0.30.2 h1:ACouHiYl1yFI2VFI3YGM+lvxgy6ir4yK2oLOsLI1/tw=
645645
k8s.io/apiserver v0.30.2/go.mod h1:BOTdFBIch9Sv0ypSEcUR6ew/NUFGocRFNl72Ra7wTm8=
646-
k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50=
647-
k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs=
646+
k8s.io/client-go v0.31.0-alpha.2 h1:13UCBphjOLcqQ1ROBA+y9sr9Bmc/Ss1ypHQEDb6uKas=
647+
k8s.io/client-go v0.31.0-alpha.2/go.mod h1:wF4N5QBYqOoXntvUsYd5eyfDLqskc/UNDyEF6WvaFIk=
648648
k8s.io/code-generator v0.30.2 h1:ZY1+aGkqZVwKIyGsOzquaeZ5rSfE6wZHur8z3jQAaiw=
649649
k8s.io/code-generator v0.30.2/go.mod h1:RQP5L67QxqgkVquk704CyvWFIq0e6RCMmLTXxjE8dVA=
650-
k8s.io/component-base v0.30.2 h1:pqGBczYoW1sno8q9ObExUqrYSKhtE5rW3y6gX88GZII=
651-
k8s.io/component-base v0.30.2/go.mod h1:yQLkQDrkK8J6NtP+MGJOws+/PPeEXNpwFixsUI7h/OE=
650+
k8s.io/component-base v0.31.0-alpha.2 h1:bAYhaSt++Mf7x0042QkeKJpzOuMq3KP7WGiLIM2hBcA=
651+
k8s.io/component-base v0.31.0-alpha.2/go.mod h1:4RdlW5OL0oab6gWaGWjxIcgORwuiuO49gV2GSxJ/9io=
652652
k8s.io/gengo/v2 v2.0.0-20240404160639-a0386bf69313 h1:bKcdZJOPICVmIIuaM9+MXmapE94dn5AYv5ODs1jA43o=
653653
k8s.io/gengo/v2 v2.0.0-20240404160639-a0386bf69313/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8=
654654
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
@@ -668,8 +668,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
668668
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
669669
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY=
670670
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
671-
sigs.k8s.io/controller-runtime v0.16.0 h1:5koYaaRVBHDr0LZAJjO5dWzUjMsh6cwa7q1Mmusrdvk=
672-
sigs.k8s.io/controller-runtime v0.16.0/go.mod h1:77DnuwA8+J7AO0njzv3wbNlMOnGuLrwFr8JPNwx3J7g=
671+
sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw=
672+
sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg=
673673
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
674674
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
675675
sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 h1:PFWFSkpArPNJxFX4ZKWAk9NSeRoZaXschn+ULa4xVek=

pkg/client/operatorclient.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,12 @@ func (c *OperatorHelperClient) UpdateOperatorStatus(ctx context.Context, resourc
7878

7979
return &ret.Status.OperatorStatus, nil
8080
}
81+
82+
func (c *OperatorHelperClient) GetOperatorStateWithQuorum(ctx context.Context) (*operatorv1.OperatorSpec, *operatorv1.OperatorStatus, string, error) {
83+
instance, err := c.client.Get(ctx, names.OPERATOR_CONFIG, metav1.GetOptions{})
84+
if err != nil {
85+
return nil, nil, "", err
86+
}
87+
88+
return &instance.Spec.OperatorSpec, &instance.Status.OperatorStatus, instance.ResourceVersion, nil
89+
}

pkg/controller/allowlist/allowlist_controller.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,18 @@ func add(mgr manager.Manager, r *ReconcileAllowlist) error {
6464

6565
r.client.Default().AddCustomInformer(cmInformer) // Tell the ClusterClient about this informer
6666

67-
return c.Watch(&source.Informer{Informer: cmInformer},
68-
&handler.EnqueueRequestForObject{},
69-
predicate.ResourceVersionChangedPredicate{},
70-
predicate.NewPredicateFuncs(func(object crclient.Object) bool {
71-
// Only care about cni-sysctl-allowlist, but also watching for default-cni-sysctl-allowlist
72-
// as a trigger for creating cni-sysctl-allowlist if it doesn't exist
73-
return (strings.Contains(object.GetName(), names.ALLOWLIST_CONFIG_NAME))
74-
75-
}),
76-
)
67+
return c.Watch(&source.Informer{
68+
Informer: cmInformer,
69+
Handler: &handler.EnqueueRequestForObject{},
70+
Predicates: []predicate.Predicate{
71+
predicate.ResourceVersionChangedPredicate{},
72+
predicate.NewPredicateFuncs(func(object crclient.Object) bool {
73+
// Only care about cni-sysctl-allowlist, but also watching for default-cni-sysctl-allowlist
74+
// as a trigger for creating cni-sysctl-allowlist if it doesn't exist
75+
return (strings.Contains(object.GetName(), names.ALLOWLIST_CONFIG_NAME))
76+
}),
77+
},
78+
})
7779
}
7880

7981
var _ reconcile.Reconciler = &ReconcileAllowlist{}

pkg/controller/clusterconfig/clusterconfig_controller.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,19 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
4242
return err
4343
}
4444

45+
informer, err := mgr.GetCache().GetInformer(context.Background(), &configv1.Network{})
46+
if err != nil {
47+
return err
48+
}
49+
4550
// Watch for changes to primary resource config.openshift.io/v1/Network
46-
err = c.Watch(source.Kind(mgr.GetCache(), &configv1.Network{}), &handler.EnqueueRequestForObject{}, predicate.GenerationChangedPredicate{})
51+
err = c.Watch(&source.Informer{
52+
Informer: informer,
53+
Handler: &handler.EnqueueRequestForObject{},
54+
Predicates: []predicate.Predicate{
55+
predicate.GenerationChangedPredicate{},
56+
},
57+
})
4758
if err != nil {
4859
return err
4960
}

pkg/controller/configmap_ca_injector/controller.go

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,22 @@ func add(mgr manager.Manager, r *ReconcileConfigMapInjector) error {
8181
}
8282

8383
// Wire up the informers to the queue
84-
if err := c.Watch(&source.Informer{Informer: r.labelInformer},
85-
&handler.EnqueueRequestForObject{},
86-
predicate.ResourceVersionChangedPredicate{},
87-
); err != nil {
84+
if err := c.Watch(&source.Informer{
85+
Informer: r.labelInformer,
86+
Handler: &handler.EnqueueRequestForObject{},
87+
Predicates: []predicate.Predicate{
88+
predicate.ResourceVersionChangedPredicate{},
89+
},
90+
}); err != nil {
8891
return err
8992
}
90-
if err := c.Watch(&source.Informer{Informer: r.nsInformer},
91-
&handler.EnqueueRequestForObject{},
92-
predicate.NewPredicateFuncs(isCABundle),
93-
); err != nil {
93+
if err := c.Watch(&source.Informer{
94+
Informer: r.nsInformer,
95+
Handler: &handler.EnqueueRequestForObject{},
96+
Predicates: []predicate.Predicate{
97+
predicate.NewPredicateFuncs(isCABundle),
98+
},
99+
}); err != nil {
94100
return err
95101
}
96102

pkg/controller/connectivitycheck/connectivity_check_controller.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,14 @@ func (c *connectivityCheckTemplateProvider) generate(ctx context.Context, syncCo
206206
if c.connectivityChecksStatus != currentStatus {
207207
condition := currentStatus
208208
condition.LastTransitionTime = metav1.NewTime(time.Now())
209-
netConfig := applyconfigv1.Network(names.CLUSTER_CONFIG).WithStatus(applyconfigv1.NetworkStatus().WithConditions(condition))
209+
applyCondition := &applyconfigmetav1.ConditionApplyConfiguration{
210+
Type: &condition.Type,
211+
Status: &condition.Status,
212+
LastTransitionTime: &condition.LastTransitionTime,
213+
Reason: &condition.Reason,
214+
Message: &condition.Message,
215+
}
216+
netConfig := applyconfigv1.Network(names.CLUSTER_CONFIG).WithStatus(applyconfigv1.NetworkStatus().WithConditions(applyCondition))
210217
_, err := c.configClient.ConfigV1().Networks().Apply(context.TODO(), netConfig, metav1.ApplyOptions{
211218
Force: true,
212219
FieldManager: "cluster-network-operator/connectivity-check-controller",

pkg/controller/dashboards/dashboard_controller.go

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,25 @@ func add(mgr manager.Manager, r *ReconcileDashboard) error {
8383
r.client.Default().AddCustomInformer(cmInformer) // Tell the ClusterClient about this informer
8484

8585
firstRun := true
86-
return c.Watch(&source.Informer{Informer: cmInformer},
87-
&handler.EnqueueRequestForObject{},
88-
predicate.ResourceVersionChangedPredicate{},
89-
predicate.NewPredicateFuncs(func(object crclient.Object) bool {
90-
if firstRun {
91-
firstRun = false
92-
return true
93-
}
94-
for _, ref := range dashboardRefs {
95-
if object.GetName() == ref.name {
86+
return c.Watch(&source.Informer{
87+
Informer: cmInformer,
88+
Handler: &handler.EnqueueRequestForObject{},
89+
Predicates: []predicate.Predicate{
90+
predicate.ResourceVersionChangedPredicate{},
91+
predicate.NewPredicateFuncs(func(object crclient.Object) bool {
92+
if firstRun {
93+
firstRun = false
9694
return true
9795
}
98-
}
99-
return false
100-
}),
101-
)
96+
for _, ref := range dashboardRefs {
97+
if object.GetName() == ref.name {
98+
return true
99+
}
100+
}
101+
return false
102+
}),
103+
},
104+
})
102105
}
103106

104107
var _ reconcile.Reconciler = &ReconcileDashboard{}

pkg/controller/egress_router/egress_router_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func Add(mgr manager.Manager, status *statusmanager.StatusManager, cli cnoclient
5050
}
5151

5252
// Watch for changes to primary resource EgressRouter.network.operator.openshift.io/v1
53-
err = c.Watch(source.Kind(mgr.GetCache(), &netopv1.EgressRouter{}), &handler.EnqueueRequestForObject{})
53+
err = c.Watch(source.Kind(mgr.GetCache(), &netopv1.EgressRouter{}, &handler.TypedEnqueueRequestForObject[*netopv1.EgressRouter]{}))
5454
if err != nil {
5555
return err
5656
}

pkg/controller/infrastructureconfig/infrastructureconfig_controller.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"log"
77
"reflect"
8+
"sigs.k8s.io/controller-runtime/pkg/predicate"
89

910
configv1 "github.com/openshift/api/config/v1"
1011
"github.com/openshift/cluster-network-operator/pkg/apply"
@@ -48,8 +49,18 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
4849
return err
4950
}
5051

52+
informer, err := mgr.GetCache().GetInformer(context.Background(), &configv1.Network{})
53+
if err != nil {
54+
return err
55+
}
5156
// Watch for changes to primary resource config.openshift.io/v1/Infrastructure
52-
err = c.Watch(source.Kind(mgr.GetCache(), &configv1.Infrastructure{}), &handler.EnqueueRequestForObject{}, onPremPlatformPredicate())
57+
err = c.Watch(&source.Informer{
58+
Informer: informer,
59+
Handler: &handler.EnqueueRequestForObject{},
60+
Predicates: []predicate.Predicate{
61+
onPremPlatformPredicate(),
62+
},
63+
})
5364
if err != nil {
5465
return err
5566
}

pkg/controller/ingressconfig/ingressconfig_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func add(mgr manager.Manager, r *ReconcileIngressConfigs) error {
5252
if err != nil {
5353
return err
5454
}
55-
err = c.Watch(source.Kind(mgr.GetCache(), &operv1.IngressController{}), &handler.EnqueueRequestForObject{})
55+
err = c.Watch(source.Kind(mgr.GetCache(), &operv1.IngressController{}, &handler.TypedEnqueueRequestForObject[*operv1.IngressController]{}))
5656
if err != nil {
5757
return err
5858
}

0 commit comments

Comments
 (0)