Repository navigation
atelet: run on nodes GKE creates for a ComputeClass - #2679
Eitan Yarmush (EItanya) merged 3 commits into
Conversation
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 |
There was a problem hiding this comment.
Hmm ... are we going to add all vendor taints here? This might belong in the install-gke repo.
|
Benjamin Elder (@BenTheElder) Good question — we checked Without this toleration,
We considered two options here:
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? |
|
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. |
| return daemonSets, deployments | ||
| } | ||
|
|
||
| // atelet has to run on every node a worker can land on. GKE taints the nodes |
There was a problem hiding this comment.
This unit test is a waste of compute. We should not be asserting a config constant for a cloud provider on every PR.
There was a problem hiding this comment.
Fair point, it only pins a provider constant. I'll drop it.
|
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.
|
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:
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). |
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.
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 throughtemplate.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 toleratesate.dev/sandboxClass, so it never runs on those nodes. Without atelet, the node advertises noate.dev/kvm, and the workers stay Pending:This PR:
How I tested it
On GKE Standard 1.37.1-gke.1552000, I used a ComputeClass with
n4→c3→n2priorities, 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.c3node for the class (aftern4was out of capacity). atelet didn't schedule there: the DaemonSet stayed at the two default-pool nodes. The workers stayed Pending, anddeploy demo counter-microvmtimed out at0/2 replicas available.hack/install-ate.sh --deploy-atelet): atelet ran on the ComputeClass node, which then advertisedate.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.shandgolangci-lint.shpass.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/kvmextended 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 ComputeClassminimumCapacityfield.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 allNoScheduletaints instead of this GKE-specific key, I'm happy to switch.Tests pass
Appropriate changes to documentation are included in the PR