feat: controller-runtime compatibility, watch:, and queue.retryBackoff: - #264
Merged
Conversation
- kubeclient.Interface + ToClient + domain.ReconcilerFrom: two-line constructor, zero changes to Reconcile - watch: block: secondary resource watches that re-enqueue the owning CR - queue.retryBackoff: per-CRD backoff; external[].retryBackoff: per-call retry config - sentinel package: generationChanged, labelsChanged, annotationsChanged, deletionStarted, finalizersChanged - docs: README, CHANGELOG, landing page, architecture, sentinel + watch + retryBackoff schema pages
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.
Every controller-runtime operator carries the same infrastructure: a Manager, scheme registration, SetupWithManager, leader election wiring. Orkestra already absorbs all of that. This PR closes the gap between the two worlds.
kubeclient.Interfaceis the single injection point.kubeclient.ToClienthands back aclient.Client.domain.ReconcilerFromadapts thereconcile.Reconcilersignature. The result is a two-line constructor — the reconciler body is untouched:That is the entire migration. No Manager. No scheme. No SetupWithManager.
ork migrate --mode toclientgenerates it.The
watch:block gives an operatorBox a secondary watch. When a Deployment or ConfigMap changes, the owning CR is re-enqueued — without writing an informer. Sentinels (generationChanged,labelsChanged,annotationsChanged,deletionStarted,finalizersChanged) are computed at UpdateFunc time and carried through the queue soenqueueGatecan filter before the item is ever dequeued.queue.retryBackoff:puts the runtime in control of retry timing after a failed reconcile.external[].retryBackoff:does the same for each HTTP call. Both take a shorthand duration or a fullinitial / max / multiplier / maxAttemptsblock. Both are validated byork validate.Client Caching
All
client.Get()calls currently bypass the informer cache and make direct API server requests. While Orkestra maintains informers for all registered and watched resources, thekubeclient.ToClientadapter does not yet leverage the cached client. The next PR will switch to an informer-backed client to align with controller-runtime's caching behavior.Requeue Semantics
The
requeue.afterfield is not yet supported. Orkestra'sReconcilemethod signature(ctx, key)does not align with controller-runtime's(ctx, request) (result, error)pattern, which is required for proper requeue handling. The next PR will adopt the controller-runtime reconciliation signature, enabling:requeue.aftersupport for all operatorswhenandorcondition-based requeue timing for declarative operatorsPlanned declarative syntax: