You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: plan-centric reconcile foundations (Steps 1-4)
Lay the groundwork for making Plan the central reconciliation abstraction
across all SeiNode phases. This is the non-behavioral half of the refactor
— all new code is additive and existing behavior is unchanged.
Step 1: Add TargetPhase/FailedPhase to TaskPlan CRD
- Executor sets node phase atomically with plan completion/failure
- Both fields are optional; empty means no transition (backward compatible)
Step 2: Extract resource generators to internal/noderesource/
- Moves StatefulSet, Service, PVC generation out of the controller package
- Breaks the import cycle that would exist between task and controller
- Controller now calls noderesource.* directly (no delegate wrappers)
Step 3: New controller-side tasks (ensure-data-pvc, apply-statefulset, apply-service)
- Fire-and-forget tasks that complete synchronously in Execute
- Registered in the task registry, not yet wired into any plan
Step 4: Executor handles TargetPhase and convergence plan cleanup
- On plan completion: applies TargetPhase to node status in same patch
- On plan failure: applies FailedPhase to node status in same patch
- Convergence plans (target == current phase): nils the plan on completion
- OnPlanComplete/OnPlanFailed callbacks for metrics/events
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: remove callbacks from executor, use Conditions for failure
Remove PhaseTransition struct and OnPlanComplete/OnPlanFailed callbacks.
The executor directly owns phase transitions via TargetPhase/FailedPhase
without needing callback indirection.
On plan failure, set a PlanFailed Condition on the node with the failed
task type as the Reason and a message describing what went wrong. This
follows the standard K8s Conditions pattern already used by monitor tasks.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Condition Reason to CamelCase, preserve init plan on completion
Two fixes from expert review:
1. PlanFailed Condition Reason now uses "TaskFailed" (CamelCase) instead
of the kebab-case task type string. K8s convention requires Reasons to
be CamelCase machine-readable tokens. The task type is already in the
Message field.
2. nilPlanIfConvergence now captures the pre-mutation phase and compares
against it, so only convergence plans (same phase before and after) get
nilled. Init plans (Initializing → Running) keep their completed plan
visible in status for observability.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments