feat: enforce snapshot CPU compatibility - #69
Merged
Conversation
Publish each node's configured snapshot CPU class and reject classified pods on incompatible hosts across create, wake, and startup reconciliation. Pin the merged cocoon-common contract.
tonicmuroq
force-pushed
the
feat/snapshot-cpu-compatibility
branch
from
August 11, 2026 07:51
a1e35c7 to
96d8a15
Compare
- move assertPodSnapshotCompatibility to compatibility.go beside its test - drop the stale-label delete: nodeutil builds the node template fresh each start, so the branch was unreachable - inline VK_SNAPSHOT_CPU_CLASS validation; IsValidLabelValue accepts empty, making the wrapper and its empty-check redundant
- re-assert node labels inside the endpoint patch loop: v-k only patches the status subresource after node creation, so a re-stamped or cleared snapshot CPU class never reached an existing node object - skip compatibility enforcement for Succeeded/Failed pods so a leftover terminal pod cannot block node registration
Mirrors the unconditional UpdateStatus below; the maps diff guard only saved one idempotent write per process start at the cost of an import, a clone per attempt, and a second nested retry path.
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
VK_SNAPSHOT_CPU_CLASSas the node's snapshot CPU compatibility labelUses the merged snapshot compatibility contract from cocoon-common#16.
Test plan
go mod tidymake test