Skip to content

atelet: run on nodes GKE creates for a ComputeClass - #2679

Merged
Eitan Yarmush (EItanya) merged 3 commits into
agent-substrate:mainfrom
roycaihw:atelet-tolerate-computeclass-taint
Oct 16, 2026
Merged

Eitan Yarmush (EItanya) merged 3 commits into
agent-substrate:mainfrom
roycaihw:atelet-tolerate-computeclass-taint

Conversation

@roycaihw

@roycaihw Haowei Cai (Roy) (roycaihw) commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

GKE taints every node it creates for a ComputeClass with cloud.google.com/compute-class=<class>:NoSchedule, and adds the matching toleration only to pods that select the class (nodeSelector: {cloud.google.com/compute-class: <class>}). A WorkerPool can select a ComputeClass through template.nodeSelector. For micro-VM pools that's the natural way to get nested-virtualization nodes (priorityDefaults.enableNestedVirtualization: true), with fallback across machine families on stockouts. But the atelet DaemonSet only tolerates ate.dev/sandboxClass, so it never runs on those nodes. Without atelet, the node advertises no ate.dev/kvm, and the workers stay Pending:

0/3 nodes are available: 1 Insufficient ate.dev/kvm, 2 node(s) didn't match Pod's node affinity/selector.

This PR:

  • adds a toleration for the ComputeClass taint key (any value) to the atelet DaemonSet,
  • adds a sentence to the API guide.

How I tested it

On GKE Standard 1.37.1-gke.1552000, I used a ComputeClass with n4 → c3 → n2 priorities, nested virtualization, and node pool auto-creation. Substrate was main at e3b707f (this branch is rebased onto a later main with no changes to these files), and the counter-microvm WorkerPool selected the class.

  • Before: GKE created a tainted c3 node for the class (after n4 was out of capacity). atelet didn't schedule there: the DaemonSet stayed at the two default-pool nodes. The workers stayed Pending, and deploy demo counter-microvm timed out at 0/2 replicas available.
  • With this change (hack/install-ate.sh --deploy-atelet): atelet ran on the ComputeClass node, which then advertised ate.dev/kvm: 4096. The workers scheduled and the golden snapshot was built. The counter actor kept its count across suspend/resume, including a resume onto a different worker pod.
  • go test ./cmd/ate-setup/internal/steps/ passes. hack/verify/gofmt.sh, boilerplate.sh and golangci-lint.sh pass.

Related, not addressed here

  • Autoscaling. Cluster Autoscaler can't create a ComputeClass node pool for a micro-VM worker. The pod requests the ate.dev/kvm extended resource, which exists only once atelet runs on a node, so node auto-provisioning rejects it (no.scale.up.nap.pod.zonal.resources.exceeded). There's no scale-from-zero and no fallback to another ComputeClass priority for micro-VM workers: a pool only grows onto existing nodes, or onto more nodes of an existing node pool that already has a live node. I can open a separate issue to discuss options, for example not requesting the device on nested-virtualization nodes, or documenting pre-provisioning with the ComputeClass minimumCapacity field.

  • Other taints. A WorkerPool can set arbitrary template.tolerations, so the same mismatch applies to any custom taint. If you'd rather have atelet tolerate all NoSchedule taints instead of this GKE-specific key, I'm happy to switch.

  • Tests pass

  • Appropriate changes to documentation are included in the PR

GKE taints every node it creates for a ComputeClass with
cloud.google.com/compute-class=<class>:NoSchedule and adds the matching
toleration only to pods that select the class. A WorkerPool that selects a
ComputeClass through template.nodeSelector gets its workers placed on those
nodes, but the atelet DaemonSet tolerated only ate.dev/sandboxClass and never
ran there. Without atelet the node advertises no ate.dev/kvm device and serves
no actors, so micro-VM workers on ComputeClass-provisioned
nested-virtualization nodes stayed Pending.

Tolerate the ComputeClass taint key for any class value, and check every
manifest path that applies atelet for the toleration.
- key: ate.dev/sandboxClass
operator: Exists
effect: NoSchedule
# GKE taints the nodes it creates for a ComputeClass with

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm ... are we going to add all vendor taints here? This might belong in the install-gke repo.

@roycaihw

Copy link
Copy Markdown
Contributor Author

Benjamin Elder (@BenTheElder) Good question — we checked ai-on-gke/substrate-gke to see if this could live there today, and currently substrate-gke does not maintain its own ate-install manifests or overlays: it clones agent-substrate/substrate at a pinned commit and runs go run ./cmd/ate-setup deploy ate-system, which renders manifests/ate-install/base directly from this repo. The Kustomize/Helm provider-overlay redesign (#2304 / #2579) is scheduled for post-GA.

Without this toleration, atelet never schedules onto ComputeClass nodes:

  • MicroVM WorkerPools: No node ever advertises ate.dev/kvm, so all worker pods remain Pending.
  • gVisor WorkerPools: Worker pods schedule onto the ComputeClass nodes and report WORKER_STATE_ACTIVE with 0 capacity because atelet isn't on the node, silently breaking actor placement.

We considered two options here:

  1. Option A (Preferred — merge this PR as-is for GA, track moving it in a GitHub issue): Merge the cloud.google.com/compute-class: NoSchedule toleration as-is to unblock GKE ComputeClass support for GA, and open a follow-up GitHub issue (linked to #2304) to move this vendor-specific toleration into the GKE install overlay once provider overlays land.
  2. Option B (Wildcard NoSchedule toleration): Have atelet.yaml tolerate all NoSchedule taints (operator: Exists, effect: NoSchedule). While vendor-neutral, that is quite aggressive since it would schedule atelet onto every NoSchedule-tainted node in a cluster even when unrelated to Substrate.

Because Option B is pretty aggressive, I'd still prefer Option A (merging this PR as-is and tracking the move to the GKE overlay in a follow-up GitHub issue). Does that sound good to you?

@BenTheElder

Copy link
Copy Markdown
Collaborator

I'm going to ask a non-google maintainer. I see some value to making the default manifests reasonable everywhere, but this might get out of hand, and the toleration could be added via something akin to a kustomize patch in substrate-gke, regardless of a redesign of the core install experience.

cc Eitan Yarmush (@EItanya)

return daemonSets, deployments
}

// atelet has to run on every node a worker can land on. GKE taints the nodes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This unit test is a waste of compute. We should not be asserting a config constant for a cloud provider on every PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair point, it only pins a provider constant. I'll drop it.

@EItanya

Copy link
Copy Markdown
Collaborator

I don't feel super strongly about this, but given that we're planning to pursue extensibility via kustomize as a part of our core installation process soon, could we do something similar here

We already compose Kustomize components internally in ate-setup, but callers can't currently supply their own. Could we expose an optional component-path flag and have the GKE installer pass a component containing this toleration?

That would keep the provider-specific configuration in substrate-gke, and it seems small enough to handle ahead of the broader installer redesign. We'd need to apply the component through the shared renderer so it covers both deploy ate-system and standalone deploy atelet.

It only asserted a cloud provider constant in the rendered manifests,
which is not worth running on every PR.
@roycaihw

Copy link
Copy Markdown
Contributor Author

Thanks Eitan Yarmush (@EItanya). One concern: under the extensible install proposal (#2304), substrate-gke would eventually ship its own kustomization with a GKE component and ate-setup becomes dev tooling, so this flag would be transitional, and the proposal suggests holding off on new ate-setup extension points until that lands. Since we need something for GA before then, two options:

  1. Keep the toleration in atelet.yaml for now and move it into substrate-gke's GKE component when the provider kustomization exists. atelet.yaml already carries GKE defaults that will move then (e.g. the GCS storage backend), so this just moves with them, and there's no new interface to deprecate.
  2. Add the flag as --experimental-kustomize-components, explicitly transitional, with the toleration in a Component in substrate-gke that the provider kustomization can reuse as-is.

I lean toward 1, but I'm happy to do 2 if you'd rather keep it out of the core manifests now. Either way I'll drop the test per Benjamin Elder (@BenTheElder).

@EItanya

Copy link
Copy Markdown
Collaborator

Thanks Eitan Yarmush (Eitan Yarmush (@EItanya)). One concern: under the extensible install proposal (#2304), substrate-gke would eventually ship its own kustomization with a GKE component and ate-setup becomes dev tooling, so this flag would be transitional, and the proposal suggests holding off on new ate-setup extension points until that lands. Since we need something for GA before then, two options:

  1. Keep the toleration in atelet.yaml for now and move it into substrate-gke's GKE component when the provider kustomization exists. atelet.yaml already carries GKE defaults that will move then (e.g. the GCS storage backend), so this just moves with them, and there's no new interface to deprecate.
  2. Add the flag as --experimental-kustomize-components, explicitly transitional, with the toleration in a Component in substrate-gke that the provider kustomization can reuse as-is.

I lean toward 1, but I'm happy to do 2 if you'd rather keep it out of the core manifests now. Either way I'll drop the test per Benjamin Elder (Benjamin Elder (@BenTheElder)).

Ok I buy that, would you mind leaving a TODO with your GH tag on it to move it out into an overlay once the new installer lands?

The toleration is GKE-specific. It moves into the GKE install overlay once
the new installer lands, tracked in agent-substrate#2760.
@roycaihw

Copy link
Copy Markdown
Contributor Author

Sounds good, thanks! Done in 26b4862: the toleration now carries a TODO(roycaihw), and #2760 tracks moving it into the GKE install overlay once the new installer lands.

@EItanya
Eitan Yarmush (EItanya) added this pull request to the merge queue Oct 16, 2026
Merged via the queue into agent-substrate:main with commit 648112d Oct 16, 2026
15 checks passed
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.

3 participants