An Instance is "Available" when it's ready to serve, even when scaled to zero#150
Merged
Conversation
…d add federation status surface BREAKING CHANGE: the Instance "Running" condition is renamed to "Available". The InstanceRunning/InstanceReadyReasonRunning/InstanceRunningReason* constants are removed in favor of InstanceAvailable/InstanceReadyReasonAvailable/ InstanceAvailableReason* (Stopped/Starting/Stopping/Available). This extracts the shared API surface that the federation controllers (#107 and the refdata stack) build on, so it can land independently as the base of that stack: - Renames the Instance condition from "Running" to "Available" across the Instance/Workload/WorkloadDeployment types and the generated CRDs. - Adds the blocking-reason Ready constants used to surface why an Instance is not yet Available: InstanceReadyReasonImageUnavailable, InstanceCrashing, ConfigurationError, and Provisioning. - Adds the additive rollout status fields UpdatedReplicas and ObservedGeneration consumed by the federation deployment controllers. - Regenerates the CRDs under config/base/crd to match. - Migrates the existing instance controller and its test to the renamed constants (rename only; no federation logic is introduced here). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
JoseSzycho
approved these changes
Jun 5, 2026
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.
Why
Available, notRunningWe're renaming the Instance readiness condition from
RunningtoAvailable— and the reason is the user's mental model, not a cosmetic preference.Runningimplies a process is actively executing right now. That's the wrong guarantee for a scale-to-zero Instance that's woken on activity: such an Instance may be scaled to zero with nothing executing, yet it is still fully available — it will accept a request and wake on demand. Reporting that Instance as not-Runningwould be alarming and simply wrong; reporting it asAvailablestates the guarantee users actually care about — the workload is ready to serve — independent of whether anything is running at this instant.So
Availabledecouples readiness from runtime state. A dormant, scale-to-zero Instance and a warm, actively-serving one are bothAvailable; the distinction between "asleep" and "executing" belongs in reasons/metrics, not in the top-level readiness signal. It also matches how the rest of the platform expresses "ready to use," keeping the signal consistent across resources.What
Availableinstead ofRunning(the existing controller is updated to match, so nothing breaks today).This is an API-and-contract change only — no new controller behavior — and it builds and passes tests against
mainon its own.The Instance
Runningcondition is renamed toAvailable. Anything reading theRunningcondition (its type or reasons) must move toAvailable.Stack
Base of the federation foundation:
main ← this ← #107 ← …. Extracted from #107 so the breaking rename — and the rationale above — reviews on its own.🤖 Generated with Claude Code