Skip to content

feat: add superseded-by for runtime classes - #685

Open
savme wants to merge 4 commits into
mainfrom
feat/runtimeclass-superseded-by
Open

savme wants to merge 4 commits into
mainfrom
feat/runtimeclass-superseded-by

Conversation

@savme

@savme savme commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Adds a compute.datumapis.com/superseded-by annotation for RuntimeClasses.

A superseded class keeps working for every workload that uses it, but it's no longer the default or offered as a choice. This lets unikernel be replaced by microvm without touching existing workloads.

  • Catalog: Default() skips superseded classes, and Offered() lists only current ones.
  • Admission: creating a workload that names a superseded class is allowed, with a warning naming the replacement. Updates don't warn, because the class can't change. Rejection messages list only offered classes.
  • datumctl: the deploy plan and image check use the catalog default, and the image check never suggests a superseded class. --runtime-class now completes with the offered classes.

Nothing changes until a class carries the annotation. This needs to be rolled out to every environment before any changes to the runtime classes themselves.

Related to #684

@savme
savme requested a review from a team as a code owner November 30, 2026 22:14

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve.

A superseded runtime class only produces a warning on workload create. Update validation is untouched and selection still uses catalog.Find, so workloads already naming a superseded class, and the controller's patches to them, are still admitted. SupersededBy is read once and never followed, so a loop or a missing target can't hang. The console-session and logs edits move onto Catalog.Resolve with the same behavior, and the CRD change is description-only. go build ./... and the changed packages' tests pass at this head.

Follow-up: Default() now skips a superseded class. Superseding the current default before marking its replacement as default leaves no default, and then:

  • new workloads that name no class are rejected
  • stored workloads with an empty class are rejected on every update, including the controller's own patches (workload_validation.go:105)

If the replacement is already the default, those workloads quietly move to its tier on their next update. Guard the order, and test Default() with a superseded default.

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.

2 participants