Skip to content

Commit 4758af2

Browse files
Bump sigs.k8s.io/controller-runtime from 0.22.4 to 0.23.1 (#2397)
* Bump sigs.k8s.io/controller-runtime from 0.22.4 to 0.23.1 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.22.4 to 0.23.1. - [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.22.4...v0.23.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.23.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Fix breaking changes * update bundle --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joel Takvorian <jtakvori@redhat.com>
1 parent 6e0feb0 commit 4758af2

File tree

75 files changed

+1405
-514
lines changed

Some content is hidden

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

75 files changed

+1405
-514
lines changed

api/flowcollector/v1beta2/flowcollector_validation_webhook.go

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import (
1111
"strings"
1212

1313
"github.com/netobserv/flowlogs-pipeline/pkg/dsl"
14-
kerr "k8s.io/apimachinery/pkg/api/errors"
15-
runtime "k8s.io/apimachinery/pkg/runtime"
1614
"k8s.io/apimachinery/pkg/util/intstr"
1715
logf "sigs.k8s.io/controller-runtime/pkg/log"
1816
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
@@ -33,27 +31,19 @@ var (
3331
)
3432

3533
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
36-
func (r *FlowCollector) ValidateCreate(ctx context.Context, newObj runtime.Object) (admission.Warnings, error) {
34+
func (r *FlowCollector) ValidateCreate(ctx context.Context, fc *FlowCollector) (admission.Warnings, error) {
3735
log.Info("validate create", "name", r.Name)
38-
fc, ok := newObj.(*FlowCollector)
39-
if !ok {
40-
return nil, kerr.NewBadRequest(fmt.Sprintf("expected a FlowCollector but got a %T", newObj))
41-
}
4236
return r.Validate(ctx, fc)
4337
}
4438

4539
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
46-
func (r *FlowCollector) ValidateUpdate(ctx context.Context, _, newObj runtime.Object) (admission.Warnings, error) {
40+
func (r *FlowCollector) ValidateUpdate(ctx context.Context, _, fc *FlowCollector) (admission.Warnings, error) {
4741
log.Info("validate update", "name", r.Name)
48-
fc, ok := newObj.(*FlowCollector)
49-
if !ok {
50-
return nil, kerr.NewBadRequest(fmt.Sprintf("expected a FlowCollector but got a %T", newObj))
51-
}
5242
return r.Validate(ctx, fc)
5343
}
5444

5545
// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
56-
func (r *FlowCollector) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error) {
46+
func (r *FlowCollector) ValidateDelete(_ context.Context, _ *FlowCollector) (admission.Warnings, error) {
5747
log.Info("validate delete", "name", r.Name)
5848
return nil, nil
5949
}

api/flowcollector/v1beta2/flowcollector_webhook.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ import (
2222

2323
// +kubebuilder:webhook:verbs=create;update,path=/validate-flows-netobserv-io-v1beta2-flowcollector,mutating=false,failurePolicy=fail,sideEffects=None,groups=flows.netobserv.io,resources=flowcollectors,versions=v1beta2,name=flowcollectorconversionwebhook.netobserv.io,admissionReviewVersions=v1
2424
func (r *FlowCollector) SetupWebhookWithManager(mgr ctrl.Manager) error {
25-
return ctrl.NewWebhookManagedBy(mgr).
26-
For(r).
25+
return ctrl.NewWebhookManagedBy(mgr, r).
2726
WithValidator(r).
2827
Complete()
2928
}

api/flowcollector/v1beta2/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/flowmetrics/v1alpha1/flowmetric_webhook.go

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ import (
99
"github.com/netobserv/network-observability-operator/internal/pkg/helper/cardinality"
1010

1111
apierrors "k8s.io/apimachinery/pkg/api/errors"
12-
"k8s.io/apimachinery/pkg/runtime"
1312
"k8s.io/apimachinery/pkg/runtime/schema"
1413
"k8s.io/apimachinery/pkg/util/validation/field"
1514
ctrl "sigs.k8s.io/controller-runtime"
1615
logf "sigs.k8s.io/controller-runtime/pkg/log"
17-
"sigs.k8s.io/controller-runtime/pkg/webhook"
1816
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
1917
)
2018

@@ -26,39 +24,26 @@ type FlowMetricWebhook struct {
2624
}
2725

2826
// +kubebuilder:webhook:verbs=create;update,path=/validate-flows-netobserv-io-v1alpha1-flowmetric,mutating=false,failurePolicy=fail,sideEffects=None,groups=flows.netobserv.io,resources=flowmetrics,versions=v1alpha1,name=flowmetricvalidationwebhook.netobserv.io,admissionReviewVersions=v1
29-
var (
30-
_ webhook.CustomValidator = &FlowMetricWebhook{FlowMetric{}}
31-
)
32-
3327
func (r *FlowMetricWebhook) SetupWebhookWithManager(mgr ctrl.Manager) error {
34-
return ctrl.NewWebhookManagedBy(mgr).
35-
For(&FlowMetric{}).
28+
return ctrl.NewWebhookManagedBy(mgr, &FlowMetric{}).
3629
WithValidator(&FlowMetricWebhook{}).
3730
Complete()
3831
}
3932

4033
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
41-
func (r *FlowMetricWebhook) ValidateCreate(ctx context.Context, newObj runtime.Object) (warnings admission.Warnings, err error) {
34+
func (r *FlowMetricWebhook) ValidateCreate(ctx context.Context, fm *FlowMetric) (warnings admission.Warnings, err error) {
4235
flowmetriclog.Info("validate create", "name", r.Name)
43-
newFlowMetric, ok := newObj.(*FlowMetric)
44-
if !ok {
45-
return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an FlowMetric but got a %T", newObj))
46-
}
47-
return validateFlowMetric(ctx, newFlowMetric)
36+
return validateFlowMetric(ctx, fm)
4837
}
4938

5039
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
51-
func (r *FlowMetricWebhook) ValidateUpdate(ctx context.Context, _, newObj runtime.Object) (warnings admission.Warnings, err error) {
40+
func (r *FlowMetricWebhook) ValidateUpdate(ctx context.Context, _, fm *FlowMetric) (warnings admission.Warnings, err error) {
5241
flowmetriclog.Info("validate update", "name", r.Name)
53-
newFlowMetric, ok := newObj.(*FlowMetric)
54-
if !ok {
55-
return nil, apierrors.NewBadRequest(fmt.Sprintf("expected an FlowMetric but got a %T", newObj))
56-
}
57-
return validateFlowMetric(ctx, newFlowMetric)
42+
return validateFlowMetric(ctx, fm)
5843
}
5944

6045
// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
61-
func (r *FlowMetricWebhook) ValidateDelete(_ context.Context, _ runtime.Object) (warnings admission.Warnings, err error) {
46+
func (r *FlowMetricWebhook) ValidateDelete(_ context.Context, _ *FlowMetric) (warnings admission.Warnings, err error) {
6247
flowmetriclog.Info("validate delete", "name", r.Name)
6348
return nil, nil
6449
}

api/flowmetrics/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
k8s.io/client-go v0.35.1
2525
k8s.io/kube-aggregator v0.35.1
2626
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
27-
sigs.k8s.io/controller-runtime v0.22.4
27+
sigs.k8s.io/controller-runtime v0.23.1
2828
sigs.k8s.io/yaml v1.6.0
2929
)
3030

@@ -114,5 +114,5 @@ require (
114114
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 // indirect
115115
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
116116
sigs.k8s.io/randfill v1.0.0 // indirect
117-
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
117+
sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 // indirect
118118
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,13 @@ k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzk
316316
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
317317
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 h1:qPrZsv1cwQiFeieFlRqT627fVZ+tyfou/+S5S0H5ua0=
318318
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
319-
sigs.k8s.io/controller-runtime v0.22.4 h1:GEjV7KV3TY8e+tJ2LCTxUTanW4z/FmNB7l327UfMq9A=
320-
sigs.k8s.io/controller-runtime v0.22.4/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
319+
sigs.k8s.io/controller-runtime v0.23.1 h1:TjJSM80Nf43Mg21+RCy3J70aj/W6KyvDtOlpKf+PupE=
320+
sigs.k8s.io/controller-runtime v0.23.1/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0=
321321
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
322322
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
323323
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
324324
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
325-
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
326-
sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
325+
sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 h1:2WOzJpHUBVrrkDjU4KBT8n5LDcj824eX0I5UKcgeRUs=
326+
sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
327327
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
328328
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=

vendor/modules.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,8 +1188,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client
11881188
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics
11891189
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics
11901190
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client
1191-
# sigs.k8s.io/controller-runtime v0.22.4
1192-
## explicit; go 1.24.0
1191+
# sigs.k8s.io/controller-runtime v0.23.1
1192+
## explicit; go 1.25.0
11931193
sigs.k8s.io/controller-runtime
11941194
sigs.k8s.io/controller-runtime/pkg/builder
11951195
sigs.k8s.io/controller-runtime/pkg/cache
@@ -1252,7 +1252,7 @@ sigs.k8s.io/json/internal/golang/encoding/json
12521252
## explicit; go 1.18
12531253
sigs.k8s.io/randfill
12541254
sigs.k8s.io/randfill/bytesource
1255-
# sigs.k8s.io/structured-merge-diff/v6 v6.3.0
1255+
# sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482
12561256
## explicit; go 1.23
12571257
sigs.k8s.io/structured-merge-diff/v6/fieldpath
12581258
sigs.k8s.io/structured-merge-diff/v6/merge

vendor/sigs.k8s.io/controller-runtime/.golangci.yml

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/sigs.k8s.io/controller-runtime/.gomodcheck.yaml

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

0 commit comments

Comments
 (0)