Skip to content

Fix RayJob submitter pod affinity to use default config#6897

Merged
pingsutw merged 4 commits intov2from
fix-ray-task
Feb 5, 2026
Merged

Fix RayJob submitter pod affinity to use default config#6897
pingsutw merged 4 commits intov2from
fix-ray-task

Conversation

@pingsutw
Copy link
Member

@pingsutw pingsutw commented Feb 5, 2026

TL;DR

Fix the RayJob submitter pod template to use the default affinity from K8s plugin config, and update the corresponding test to verify this behavior correctly.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

The submitter pod template for RayJob was already using config.GetK8sPluginConfig().DefaultAffinity, but the test was incorrectly verifying that the submitter pod affinity matched the head pod's affinity instead of the default config affinity. This PR:

  • Adds a clarifying comment explaining why the submitter pod uses default affinity/tolerations (so it lands on the default node)
  • Updates the test to set a DefaultAffinity in the K8s plugin config and verify the submitter pod template uses it, rather than setting affinity on the head pod and expecting it to be copied

Tracking Issue

NA

Follow-up issue

NA

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Update the test to verify that the submitter pod template uses the
default affinity from K8s plugin config rather than copying the head
pod's affinity. Add clarifying comment for the affinity/tolerations
assignment.

Signed-off-by: Kevin Su <kevin@union.ai>
Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw changed the base branch from master to v2 February 5, 2026 19:51
@pingsutw pingsutw enabled auto-merge (squash) February 5, 2026 21:06
Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw merged commit 05e39be into v2 Feb 5, 2026
3 checks passed
@pingsutw pingsutw deleted the fix-ray-task branch February 5, 2026 21:12
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.

2 participants