Releases: reconcilerio/runtime
v0.23.0
Highlights
Nested Reconciler validation
Reconcilers/SubReconcilers/AdmissionWebhookAdapters are now validated, with the validation extending into nested SubReconcilers for tests. This will provide meaningful fast failures for test cases that embed invalid reconcilers.
In order to participate custom types need to implement validation.Validator
interface. Calling into the Validate()
method on nested types should be guarded by checking validation.IsRecursive
.
if validation.IsRecursive(ctx) {
if v, ok := r.Reconciler.(validation.Validator); ok {
if err := v.Validate(ctx); err != nil {
return fmt.Errorf("Advice %q must have a valid Reconciler: %w", r.Name, err)
}
}
}
ChildReconciler/ChildSetReconciler error handling
The ChildReconciler
can now define the set of error conditions that will be passed to ChildReconciler#ReflectChildStatusOnParent
at ChildReconciler#ReflectedChildErrorReasons
. By default the set of passed errors are:
Custom diffing for types in tests
ExpectConfig
and test cases that embed it are able to define a custom Differ
that is used to compare the side effects of the test expected and actual values. By default this is implemented using go-cmp. Users who wish to use a different diff implementation, or provide custom cmp.Options
may implement the Differ interface and assign it to the particular config or test case.
Breaking Changes and Deprecations
-
ResourceManager
was deprecated in v0.22.0 and is removed in favor ofObjectManager
for a generic type, orUpdatingObjectManager
. -
AggregateReconciler.{HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize}
were deprecated in v0.22.0 and are removed in favor ofAggregateReconciler.AggregateObjectManager
. -
ChildReconciler.{Finalizer, HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize, SetResourceManager}
were deprecated in v0.22.0 and are removed in favor ofChildReconciler.ChildObjectManager
. -
ChildSetReconciler.{HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize}
were deprecated in v0.22.0 and are removed in favor ofChildSetReconciler.ChildObjectManager
. -
AdmissionWebhookAdapter#Build
is newly deprecated in favor ofAdmissionWebhookAdapter#BuildWithContext
. -
AdmissionWebhookTestSuite#Run
,AdmissionWebhookTests#Run
, andAdmissionWebhookTestCase#Run
are newly deprecated in favor of#RunWithContext
.
What's Changed
- Drop deprecated ResourceManager APIs by @scothis in #549
- Bump golang.org/x/net from 0.29.0 to 0.30.0 by @dependabot in #551
- Bump sigs.k8s.io/controller-tools from 0.16.3 to 0.16.4 in /hack by @dependabot in #552
- Bump github.com/fatih/color from 1.17.0 to 1.18.0 by @dependabot in #553
- Bump the kubernetes group with 3 updates by @dependabot in #554
- Bump sigs.k8s.io/controller-runtime from 0.19.0 to 0.19.1 by @dependabot in #555
- Bump sigs.k8s.io/controller-tools from 0.16.4 to 0.16.5 in /hack by @dependabot in #556
- Bump golang.org/x/net from 0.30.0 to 0.31.0 by @dependabot in #558
- Bump codecov/codecov-action from 4 to 5 by @dependabot in #559
- Bump sigs.k8s.io/controller-runtime from 0.19.1 to 0.19.2 by @dependabot in #561
- Bump the kubernetes group with 3 updates by @dependabot in #560
- Bump sigs.k8s.io/controller-runtime from 0.19.2 to 0.19.3 by @dependabot in #562
- Bump golang.org/x/net from 0.31.0 to 0.32.0 by @dependabot in #563
- Bump the kubernetes group with 3 updates by @dependabot in #564
- Bump the kubernetes group with 4 updates by @dependabot in #565
- Bump reconciler.io/dies to 0.15.0 by @scothis in #566
- Bump golang.org/x/net from 0.32.0 to 0.33.0 by @dependabot in #567
- Bump sigs.k8s.io/controller-tools from 0.16.5 to 0.17.0 in /hack by @dependabot in #568
- Track colliding child resources that are not owned by @scothis in #569
- Bump golang.org/x/net from 0.33.0 to 0.34.0 by @dependabot in #570
- Bump sigs.k8s.io/controller-runtime from 0.19.3 to 0.19.4 by @dependabot in #571
- Bump sigs.k8s.io/controller-tools from 0.17.0 to 0.17.1 in /hack by @dependabot in #572
- Bump the kubernetes group with 3 updates by @dependabot in #573
- fix: stop using deprecated webhook.Validator and webhook.Defaulter by @mamachanko in #575
- Bump sigs.k8s.io/controller-runtime from 0.19.4 to 0.20.0 by @dependabot in #574
- Bump sigs.k8s.io/controller-runtime from 0.20.0 to 0.20.1 by @dependabot in #576
- Bump github.com/evanphx/json-patch/v5 from 5.9.0 to 5.9.10 by @dependabot in #577
- Allow ChildReconciler to choose which errors to reflect by @scothis in #579
- Bump github.com/evanphx/json-patch/v5 from 5.9.10 to 5.9.11 by @dependabot in #581
- fix: minor adjustments in README by @bartoszmajsak in #582
- Export reconciler Validate method by @scothis in #580
- Add flag for allowing status updates even when resource is being deleted by @andrew-su in #586
- Update link to AdmissionWebhookAdapter example source by @mamachanko in #587
- Polish by @mamachanko in #592
- Validate nested reconcilers by @mamachanko in #588
- Bump golang.org/x/net from 0.34.0 to 0.35.0 by @dependabot in #593
- Bump sigs.k8s.io/controller-tools from 0.17.1 to 0.17.2 in /hack by @dependabot in #594
- Allow rtesting to use custom diff func by @scothis in #590
- Bump the kubernetes group with 3 updates by @dependabot in #595
- Bump sigs.k8s.io/controller-runtime from 0.20.1 to 0.20.2 by @dependabot in #596
- Validate AdmissionWebhookAdapter by @scothis in #597
New Contributors
- @bartoszmajsak made their first contribution in #582
- @andrew-su made their first contribution in #586
Full Changelog: v0.22.0...v0.23.0
v0.22.0
Highlights
Stashers
A Stasher
provides a convenient way to stash typed values. Create a NewStasher
using the type of the value being stashed and a unique stash key. All operations through a stasher, including retrieval are type safe with options for handling missing values on retrieval.
ObjectManager
The previous ResourceManager
is split into an interface (ObjectManager
) and implementation (UpdatingObjectManager
).
The AggregateReconciler
, ChildReconciler
, and ChildSetReconciler
are updated to use the interface allowing new strategies to be plugged-in.
Breaking Changes
There are no breaking changes in this release, but a number of existing APIs have been deprecated. Migration to the suggested APIs is encouraged as the deprecated APIs will be removed in a future release.
ResourceManager
is deprecated in favor ofObjectManager
for a generic type, orUpdatingObjectManager
.AggregateReconciler.{HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize}
are deprecated in favor ofAggregateReconciler.AggregateObjectManager
.ChildReconciler.{Finalizer, HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize, SetResourceManager}
are deprecated in favor ofChildReconciler.ChildObjectManager
.ChildSetReconciler.{HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize}
are deprecated in favor ofChildSetReconciler.ChildObjectManager
.
What's Changed
- Polishing readme by @scothis in #541
- Bump sigs.k8s.io/controller-tools from 0.16.1 to 0.16.2 in /hack by @dependabot in #542
- Bump golang.org/x/net from 0.28.0 to 0.29.0 by @dependabot in #543
- Bump the kubernetes group with 3 updates by @dependabot in #544
- Bump sigs.k8s.io/controller-tools from 0.16.2 to 0.16.3 in /hack by @dependabot in #545
- Type safe stashing of context values by @scothis in #546
- ForEach reconciler by @scothis in #547
- ResourceManager -> ObjectManager by @scothis in #548
Full Changelog: v0.21.1...v0.22.0
v0.21.1
v0.21.0
Breaking changes
- feat: remove deprecated SafeDeployDiff by @mamachanko in #504
Highlights
What's Changed
- Bump the kubernetes group with 3 updates by @dependabot in #2
- Fix codecov token for repo move by @scothis in #3
- Migrate to reconciler.io/dies by @scothis in #501
- feat: remove deprecated SafeDeployDiff by @mamachanko in #504
- Bump golang.org/x/net from 0.22.0 to 0.23.0 by @dependabot in #508
- Bump golang.org/x/net from 0.23.0 to 0.24.0 by @dependabot in #510
- Bump sigs.k8s.io/controller-runtime from 0.17.2 to 0.17.3 by @dependabot in #511
- Bump the kubernetes group with 3 updates by @dependabot in #512
- Kubernetes 1.30 et al by @scothis in #519
- Bump sigs.k8s.io/controller-runtime from 0.18.0 to 0.18.1 by @dependabot in #521
- Bump golang.org/x/net from 0.24.0 to 0.25.0 by @dependabot in #523
- Bump sigs.k8s.io/controller-runtime from 0.18.1 to 0.18.2 by @dependabot in #522
- Bump github.com/fatih/color from 1.16.0 to 1.17.0 by @dependabot in #524
- Bump the kubernetes group with 3 updates by @dependabot in #526
- Bump github.com/go-logr/logr from 1.4.1 to 1.4.2 by @dependabot in #527
- Conditional clearing of finalizers by @scothis in #525
- Bump sigs.k8s.io/controller-runtime from 0.18.2 to 0.18.3 by @dependabot in #528
- AdviceReconciler by @scothis in #502
- Bump golang.org/x/net from 0.25.0 to 0.26.0 by @dependabot in #529
- Bump sigs.k8s.io/controller-runtime from 0.18.3 to 0.18.4 by @dependabot in #530
- Bump the kubernetes group with 3 updates by @dependabot in #531
- Update reconciler.io/dies to 0.13.0 by @scothis in #532
- Bump golang.org/x/net from 0.26.0 to 0.27.0 by @dependabot in #533
- Bump the kubernetes group with 3 updates by @dependabot in #534
- Bump golang.org/x/net from 0.27.0 to 0.28.0 by @dependabot in #535
- Bump sigs.k8s.io/controller-runtime from 0.18.4 to 0.18.5 by @dependabot in #536
- Bump sigs.k8s.io/controller-tools from 0.15.0 to 0.16.0 in /hack by @dependabot in #538
- Bump the kubernetes group with 4 updates by @dependabot in #537
- Bump sigs.k8s.io/controller-tools from 0.16.0 to 0.16.1 in /hack by @dependabot in #539
New Contributors
- @dependabot made their first contribution in #2
- @mamachanko made their first contribution in #504
Full Changelog: v0.20.0...v0.21.0
v0.20.0
First release after forking from github.com/vmware-labs/reconciler-runtime
. Users will need to update their go imports to remove all references to github.com/vmware-labs/reconciler-runtime/...
.
Before:
import "github.com/vmware-labs/reconciler-runtime/reconcilers"
After:
import "reconciler.io/runtime/reconcilers"
There are no other API changes since v0.19.0
What's Changed
Full Changelog: v0.19.0...v0.20.0