Upgrade sigs.k8s.io/controller-runtime to v0.23.3#264
Open
felix-kaestner wants to merge 1 commit intomainfrom
Open
Upgrade sigs.k8s.io/controller-runtime to v0.23.3#264felix-kaestner wants to merge 1 commit intomainfrom
felix-kaestner wants to merge 1 commit intomainfrom
Conversation
d358241 to
6bccde7
Compare
The priority queue is now enabled by default (kubernetes-sigs/controller-runtime#3332), so the explicit UsePriorityQueue: new(true) in cmd/main.go is dropped. The webhook builder API changed to a generic form (kubernetes-sigs/controller-runtime#3360). NewWebhookManagedBy(mgr).For(&T{}) is replaced by NewWebhookManagedBy(mgr, &T{}). Validators are migrated from the deprecated CustomValidator interface with runtime.Object signatures to the typed Validator[T] interface with concrete types, removing the type assertion boilerplate. Test cases for wrong-object-type errors are removed as they are no longer expressible at runtime. The events API changed from k8s.io/client-go/tools/record to k8s.io/client-go/tools/events (kubernetes-sigs/controller-runtime#3262). GetEventRecorderFor is replaced by GetEventRecorder. All controllers and the provisioning server are updated accordingly, and call sites are updated to the new Eventf signature which adds related object and action fields. Tests use the new events.NewFakeRecorder.
6bccde7 to
3080f4f
Compare
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking changes addressed
Priority queue now default (kubernetes-sigs/controller-runtime#3332)
UsePriorityQueue: new(true)incmd/main.go— no-op nowGeneric Validator/Defaulter webhook API (kubernetes-sigs/controller-runtime#3360)
ctrl.NewWebhookManagedBy(mgr).For(&T{})→ctrl.NewWebhookManagedBy(mgr, &T{})admission.CustomValidator(withruntime.Objectmethod signatures) to typedadmission.Validator[T](with concrete type signatures), eliminating type assertion boilerplateMigration to new events API (kubernetes-sigs/controller-runtime#3262)
mgr.GetEventRecorderFor(name)→mgr.GetEventRecorder(name)incmd/main.gok8s.io/client-go/tools/record.EventRecorder→k8s.io/client-go/tools/events.EventRecorderrecorder.Event(obj, type, reason, msg)→recorder.Eventf(obj, nil, type, reason, reason, msg)(new API addsrelatedobject andactionfields)record.NewFakeRecorder→events.NewFakeRecorder