feat(target-operatorbox): the experiment lands — phase 1 - #261
Merged
Conversation
Each serve target can declare its own operatorBox — resources, lifecycle hooks, and preReconcile gates (enqueueGate / reconcileGate). The reconciler selects the active box from serve-alias / serve-target annotations. Surface switches are detected via orkestra.orkspace.io/last-surface and cleaned up with a label-selector sweep (SweepOwnedNamespaced/ClusterScoped) rather than template expansion, which is immune to spec fields being cleared before cleanup runs. keepPreviousSurface skips the sweep when set. EffectiveOwnerKey stamps and checks ownership as <name>.<alias> for target-mode CRs, allowing per-surface resource isolation. Routing conflict detection uses ServeTargetForFieldSelector (no primary fallback) so switching targets without ?override=true fires a 409. Docs: 26-serve-target-operatorbox.md, updated 02-target-mode.md, 10-multi-cluster-routing.md (read path ?cluster param), 20-serve.md.
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.
Summary
The experiment from #260 reaches phase 1.
Each serve target can now carry its own
operatorBox. The reconciler selectsthe box from the CR's
serve-alias/serve-targetannotations — differentresources, different lifecycle hooks, different preReconcile gates per surface.
When a CR switches target, the previous surface's resources are cleaned up via
a label-selector sweep on
orkestra-owner=<name>.<prevTarget>.keepPreviousSurface: trueskips the sweep.Documentation updated.
Test plan
?override=truemake unit-testmake ork