Skip to content

feat: /createPodGroup, the pods of one pod group in a single call - #606

Draft
matbun wants to merge 3 commits into
interlink-hq:mainfrom
matbun:feat/create-podsets
Draft

matbun wants to merge 3 commits into
interlink-hq:mainfrom
matbun:feat/create-podsets

Conversation

@matbun

@matbun matbun commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A caller that holds every pod of a group, such as the members of a Kueue Workload, can send them in one POST /createPodGroup, so that a plugin submits the group as one job at once instead of buffering /create calls until the last member arrives. The name follows Kubernetes' own PodGroup (scheduling.k8s.io, KEP-4671), the set of pods scheduled together.

interLink prepares each pod as for /create (getData, then JobScriptBuilderURL or JobScriptTemplate) and forwards the group to the plugin's /createPodGroup. Each pod keeps its own data, because projected and downward API files differ from pod to pod; the order of the pods gives their ranks. The plugin answers one CreateStruct per pod, and status, logs and delete stay per pod. The route is optional: a plugin that implements it lists pod-group-create in its ping answer, and the virtual kubelet path does not change. The caller's access token reaches the plugin as on the other sidecar calls, never a job script builder.

Tested with unit tests and end to end with the Slurm plugin: five gangs (PyTorch, MPI, TrainJob, Ray, a plain pod group) made one group call each, no /create, and one 2-node Slurm job each.


Related issue : #599

Plugin side: interlink-hq/interlink-slurm-plugin#174

@netlify

netlify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

👷 Deploy request for interlink-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 9d9606f

@matbun matbun changed the title feat: /createPodSets, the pods of one group in a single call feat: /createPodGroup, the pods of one pod group in a single call Oct 30, 2026
matbun and others added 3 commits November 10, 2026 15:40
A caller that holds every pod of a group (a Kueue Workload's members)
sends them in one POST /createPodSets, by PodSet, so that a plugin can
submit the whole group as one job at once instead of buffering /create
calls until the last member arrives.

- New types PodSetsCreateRequests and PodSetCreateRequests (caller to
  interLink) and RetrievedPodSetsData and RetrievedPodSetData (interLink
  to plugin). Each pod is a whole PodCreateRequests: projected and
  downward API files differ from pod to pod. The order of the pods,
  PodSet after PodSet, gives their ranks; rank 0 is the head.
- CreatePodSetsHandler prepares every pod as CreateHandler does (getData,
  then JobScriptBuilderURL or JobScriptTemplate), forwards the group to
  the plugin's /createPodSets and relays its answer: one CreateStruct
  per pod in request order, or the plugin's error code. A failing job
  script answers the caller once for the whole group.
- The template step moves to renderJobScript, shared with CreateHandler,
  whose behaviour is unchanged.
- The operation is in both OpenAPI specs and in the plugin guide. It is
  optional: a plugin that implements it lists "podset-create" in the
  capabilities of its ping answer; status, logs and delete stay per pod.
- The caller's access token goes to the plugin as on the other sidecar
  calls (ForwardAccessToken), and never to a job script builder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com>
/createPodSets becomes /createPodGroup and takes a flat list of pods in
rank order instead of named PodSets. PodGroup is what Kubernetes calls a
set of pods scheduled together (scheduling.k8s.io Workload and PodGroup,
KEP-4671), while PodSet is Kueue's own term. No plugin needs the inner
names, and each pod still carries its own labels.

- PodGroupCreateRequests and RetrievedPodGroupData replace the four
  PodSet types; plugins list the capability "pod-group-create".
- Handler, route, OpenAPI specs, plugin guide and tests follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com>
The group call now starts its span with startAPITrace, records the
caller's X-Forwarded headers only with Tracing.Detailed, marks the span
as failed on every error path and as ok once the sidecar takes the
group, and passes the request context to getData, the job script
builder and the sidecar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Matteo Bunino <48362942+matbun@users.noreply.github.com>
@matbun
matbun force-pushed the feat/create-podsets branch from f438401 to 9d9606f Compare November 10, 2026 14:41

This branch has not been deployed

No deployments
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