Skip to content

Conversation

@singh1203
Copy link
Contributor

@singh1203 singh1203 commented Jan 15, 2026

Description

feat(podgrouper): Implement owner-reference chain fallback for plugin selection

Enhance PodGrouper.GetPGMetadata() to iterate through the owner chain (allOwners slice)
from top-most owner down, selecting the highest GVK with a non-default plugin via
PluginsHub.GetPodGrouperPlugin(). Eliminates scheduling regressions when new owner types
gain RBAC visibility but lack dedicated plugins (e.g., JobSet → fallback to batch/v1.Job).

Related Issues

Fixes #856

Checklist

  • Self-reviewed
  • Added/updated tests
  • Updated documentation

Breaking Changes

None

Additional Notes

Before: JobSet → no plugin → defaultgrouper (per-pod grouping)
After: JobSet → no plugin → Job → job.NewK8sJobGrouper (Job-level grouping)

Implementation via selectPluginForOwners() helper using DefaultPluginsHub type assertion.
No PluginsHub interface or plugin signature changes required.

@singh1203 singh1203 marked this pull request as ready for review January 17, 2026 07:48
Signed-off-by: Saurabh Kumar Singh <singh1203.ss@gmail.com>
Signed-off-by: Saurabh Kumar Singh <singh1203.ss@gmail.com>
@singh1203 singh1203 force-pushed the podgrouper_owner_fallback branch from a9a194d to f21e95d Compare January 17, 2026 07:48
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/podgrouper/podgrouper 73.17% (+1.74%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/podgrouper/podgrouper/podgrouper.go 73.17% (+1.74%) 82 (+12) 60 (+10) 22 (+2) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/NVIDIA/KAI-scheduler/pkg/podgrouper/podgrouper/podgrouper_test.go

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.

Enhance PodGrouper plugin matching to fallback through owner chain

1 participant