Skip to content

feat: add spec.hibernatePolicy, Waking phase, hibernated-on-node annotation#7

Open
tonicmuroq wants to merge 1 commit into
mainfrom
feat/hibernate-slot-policy
Open

feat: add spec.hibernatePolicy, Waking phase, hibernated-on-node annotation#7
tonicmuroq wants to merge 1 commit into
mainfrom
feat/hibernate-slot-policy

Conversation

@tonicmuroq

Copy link
Copy Markdown
Contributor

What

API surface for slot-release hibernation (design: https://github.com/cocoonstack/cocoon-specs/pull/5):

  • CocoonSetSpec.hibernatePolicy: retain | release, CRD default retain — every existing CR keeps today's semantics. retain keeps the hibernated placeholder pod (and its scheduling seat) on the node; release lets the operator delete the pods once the :hibernate snapshot is registry-verified, freeing the seat.
  • CEL validation: release requires agent.replicas=0 and no toolboxes (sub-agent/toolbox restore intent is a follow-up).
  • New phase Waking — the durable marker that a released-seat restore is in flight (same role Migrating plays for migration).
  • New annotation cocoonset.cocoonstack.io/hibernated-on-node — written on the CocoonSet before pod deletion; wake uses it as a preferred-affinity hint so a still-free seat restores warm from the node-local snapshot.
  • CRD manifests regenerated.

The HibernatePolicy type mirrors the existing SnapshotPolicy pattern (lowercase enum, IsValid/Default).

Consumers

Operator implementation: https://github.com/cocoonstack/cocoon-operator (feat/hibernate-slot-policy, PR linked in comments). vk-cocoon needs no change — the CreatePod restore-from-hibernate path already does cross-node restore.

…tation

hibernatePolicy selects the scheduling-seat semantics of a suspended
CocoonSet: retain (default, today's behavior) keeps the placeholder pod
bound to its node; release lets the operator delete the pods once the
hibernate snapshot is registry-verified, freeing the seat — wake then
reschedules anywhere in the pool.

CEL validation restricts release to main-only sets (replicas=0, no
toolboxes) until sub-agent/toolbox restore intent is extended. New
Waking phase marks a released-seat restore in flight; the
hibernated-on-node annotation carries the wake placement hint.

Design: cocoon-specs design/slot-release-hibernation.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant