mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-10 10:13:50 +08:00
**Updated Original PR Description** ## Summary This PR adds a small, controlled set of scheduling fields to WorkerPool so WorkerPool-managed Pods can be placed onto appropriate Kubernetes nodes. Added fields: - `nodeSelector` - `tolerations` - `priorityClassName` - `nodeAffinity` ## Scope This intentionally does not expose a full `PodTemplateSpec`, and does not add support for full `affinity`, `podAffinity`, or `podAntiAffinity`. Resource requests/limits are intentionally left out of scope for this CL while the WorkerPool resource model is still being discussed separately. The goal is to keep the first version small while addressing the WorkerPool-to-Kubernetes-Node scheduling gap discussed in [#212](https://github.com/agent-substrate/substrate/issues/212). `nodeAffinity` is included to support heterogeneous node pools where `nodeSelector` is too limited, such as requiring or preferring one of several equivalent accelerator/local-SSD/cache node pools, or expressing soft preferences during node pool migration. `priorityClassName` is included to help preserve warm WorkerPool capacity under cluster pressure. Since WorkerPool pods are the slots available for actor resume, higher-priority pools can protect latency-sensitive or interactive actor workloads from displacement by lower-priority batch workloads, and allow different WorkerPools to represent different service classes, e.g. interactive vs. batch. ## Related issue Part of #212. Related to #47.