Skip to content

feat(scheduling): add spec.scheduling.runtimeClassName - #123

Merged
stubbi merged 1 commit into
mainfrom
feat/scheduling-runtimeclassname
Jul 28, 2026
Merged

feat(scheduling): add spec.scheduling.runtimeClassName#123
stubbi merged 1 commit into
mainfrom
feat/scheduling-runtimeclassname

Conversation

@stubbi

@stubbi stubbi commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Implements #115 (the minimal ask: a single runtimeClassName field rather than a general pod-template override).

What

spec:
  scheduling:
    runtimeClassName: gvisor

Passed straight through to the instance pod template, so the agent can be placed on a sandboxed runtime (gVisor runsc, Kata) on dedicated capacity.

Two details worth calling out

Unset must be nil, not &"". An empty RuntimeClassName does not mean "cluster default" — it names a RuntimeClass whose name is empty, which the API server rejects. runtimeClassName() maps "" to nil, and TestBuildStatefulSet_RuntimeClassNameUnsetIsNil pins that, since it's the kind of thing a later refactor silently breaks.

Validated as a DNS subdomain (MaxLength=253 + the standard pattern). A malformed name is rejected at admission instead of leaving the pod permanently unschedulable with no obvious cause.

The operator deliberately does not create or verify the RuntimeClass — those are cluster-scoped infrastructure owned by the cluster admin. As the issue notes, an unknown name leaves the pod unschedulable; that's the expected failure mode.

Chose the narrow field over podOverrides

The issue offered either. A general pod-template escape hatch would also cover this, but it's a much wider contract to support and makes the operator's rendered pod non-deterministic. Going with the minimal field; if a broader override is wanted later it can subsume this.

Verification

make manifests generate sync-chart-crds sync-bundle-crds api-docs — CRD, chart CRD, OLM bundle and generated API reference all regenerated and committed. make test green, make lint 0 issues.

test/conformance fails locally, but identically on a clean main checkout — it needs a live cluster and is the known pre-existing gap, unrelated to this change.

@ilazaridis you offered to test a build — this branch builds an image on CI, happy to point you at a tag once it lands if that's useful.

Lets a HermesInstance pod run under a sandboxed container runtime (gVisor
runsc, Kata) instead of the cluster default. The agent executes untrusted,
model-driven code via its exec/shell/filesystem tools, so on multi-tenant
clusters a sandboxed runtime on dedicated capacity is a meaningful boundary
beyond namespaces and seccomp. spec.scheduling previously exposed only
affinity, nodeSelector, priorityClassName and tolerations, with no
pod-template escape hatch, so this was unreachable through the CRD.

Unset renders nil rather than a pointer to the empty string: "" is not the
cluster default, it names a RuntimeClass with an empty name, which the API
server rejects.

Validated as a DNS subdomain (the RuntimeClass name format) so a malformed
value is rejected at admission rather than leaving the pod silently
unschedulable. The named RuntimeClass must already exist in the cluster —
the operator deliberately does not create or verify it, since RuntimeClasses
are cluster-scoped infrastructure.

Refs #115

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@stubbi
stubbi merged commit 4462cb7 into main Jul 28, 2026
13 checks passed
@stubbi
stubbi deleted the feat/scheduling-runtimeclassname branch July 28, 2026 11:33
stubbi pushed a commit that referenced this pull request Jul 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.1.19](v0.1.18...v0.1.19)
(2026-07-28)


### Features

* **scheduling:** add spec.scheduling.runtimeClassName
([#123](#123))
([4462cb7](4462cb7))


### Bug Fixes

* **chart:** render pullable default image tags
([#122](#122))
([88445b1](88445b1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: paperclip-release-bot[bot] <288053502+paperclip-release-bot[bot]@users.noreply.github.com>
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