Skip to content

Conversation

@enoodle
Copy link
Collaborator

@enoodle enoodle commented Oct 31, 2025

Description

Add the ability to set different resource names to the resources created by kai-operator operands. This will make the kai-operator more useful as a package that can be imported by other projects.

Related Issues

Fixes #

Checklist

  • Self-reviewed
  • Added/updated tests (if needed) NO NEED
  • Updated CHANGELOG.md (if needed) NO NEEED - no user implications
  • Updated documentation (if needed) NO NEED - only implementation refactor

Breaking Changes

None

Additional Notes

@enoodle enoodle force-pushed the erez/configurable-resource-names branch from af31dc5 to 0ecc840 Compare October 31, 2025 00:14
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission 87.07% (+0.23%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder 69.61% (+0.61%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller 79.31% (+0.49%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper 76.79% (+0.86%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller 77.36% (+0.44%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler 78.83% (+0.31%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/admission.go 75.00% (+2.27%) 24 (+2) 18 (+2) 6 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources.go 90.22% (ø) 92 83 9
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/binder.go 72.22% (+3.47%) 18 (+2) 13 (+2) 5 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/resources.go 69.05% (ø) 84 58 26
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/pod_group_controller.go 64.00% (+3.13%) 25 (+2) 16 (+2) 9 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/resources.go 85.48% (ø) 62 53 9
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/pod_grouper.go 61.11% (+4.86%) 18 (+2) 11 (+2) 7 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/resources.go 84.21% (ø) 38 32 6
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/queue_controller.go 64.00% (+3.13%) 25 (+2) 16 (+2) 9 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/resources.go 81.48% (ø) 81 66 15
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources.go 80.00% (ø) 5 4 1
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_for_shard.go 87.76% (ø) 98 86 12
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler.go 52.94% (+2.94%) 34 (+2) 18 (+2) 16 👍

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/operator/operands/admission/admission_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/binder_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/pod_group_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/pod_grouper_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/queue_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_test.go

SiorMeir
SiorMeir previously approved these changes Nov 1, 2025
@SiorMeir
Copy link
Collaborator

SiorMeir commented Nov 1, 2025

Nitpicking: Because you are altering the behavior a bit, this is not a refactor but a fix

@enoodle enoodle force-pushed the erez/configurable-resource-names branch from 0ecc840 to 86673b2 Compare November 3, 2025 12:17
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission 87.07% (+0.23%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder 69.61% (+0.61%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller 79.31% (+0.49%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper 76.79% (+0.86%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller 77.36% (+0.44%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler 78.83% (+0.31%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/admission.go 75.00% (+2.27%) 24 (+2) 18 (+2) 6 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources.go 90.22% (ø) 92 83 9
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/binder.go 72.22% (+3.47%) 18 (+2) 13 (+2) 5 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/resources.go 69.05% (ø) 84 58 26
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/pod_group_controller.go 64.00% (+3.13%) 25 (+2) 16 (+2) 9 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/resources.go 85.48% (ø) 62 53 9
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/pod_grouper.go 61.11% (+4.86%) 18 (+2) 11 (+2) 7 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/resources.go 84.21% (ø) 38 32 6
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/queue_controller.go 64.00% (+3.13%) 25 (+2) 16 (+2) 9 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/resources.go 81.48% (ø) 81 66 15
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources.go 80.00% (ø) 5 4 1
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_for_shard.go 87.76% (ø) 98 86 12
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler.go 52.94% (+2.94%) 34 (+2) 18 (+2) 16 👍

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/operator/operands/admission/admission_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/binder_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/pod_group_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/pod_grouper_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/queue_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_test.go

@enoodle enoodle force-pushed the erez/configurable-resource-names branch from 86673b2 to d9a965c Compare November 4, 2025 15:27
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission 87.29% (+0.22%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder 69.61% (+0.61%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller 79.31% (+0.49%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper 76.79% (+0.86%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller 77.36% (+0.44%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler 78.83% (+0.31%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/admission.go 75.00% (+2.27%) 24 (+2) 18 (+2) 6 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources.go 90.43% (ø) 94 85 9
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/binder.go 72.22% (+3.47%) 18 (+2) 13 (+2) 5 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/resources.go 69.05% (ø) 84 58 26
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/pod_group_controller.go 64.00% (+3.13%) 25 (+2) 16 (+2) 9 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/resources.go 85.48% (ø) 62 53 9
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/pod_grouper.go 61.11% (+4.86%) 18 (+2) 11 (+2) 7 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/resources.go 84.21% (ø) 38 32 6
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/queue_controller.go 64.00% (+3.13%) 25 (+2) 16 (+2) 9 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/resources.go 81.48% (ø) 81 66 15
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources.go 80.00% (ø) 5 4 1
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_for_shard.go 87.76% (ø) 98 86 12
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler.go 52.94% (+2.94%) 34 (+2) 18 (+2) 16 👍

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/operator/operands/admission/admission_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/binder_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/pod_group_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/pod_grouper_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/queue_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler_test.go

@enoodle enoodle force-pushed the erez/configurable-resource-names branch from d9a965c to e2a2244 Compare November 4, 2025 16:07
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission 87.29% (+0.22%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder 69.61% (+0.61%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller 79.31% (+0.49%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper 76.79% (+0.86%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller 77.36% (+0.44%) 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler 78.83% (+0.31%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/admission.go 75.00% (+2.27%) 24 (+2) 18 (+2) 6 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources.go 90.43% (ø) 94 85 9
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/binder.go 72.22% (+3.47%) 18 (+2) 13 (+2) 5 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/resources.go 69.05% (ø) 84 58 26
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/pod_group_controller.go 64.00% (+3.13%) 25 (+2) 16 (+2) 9 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/resources.go 85.48% (ø) 62 53 9
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/pod_grouper.go 61.11% (+4.86%) 18 (+2) 11 (+2) 7 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/resources.go 84.21% (ø) 38 32 6
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/queue_controller.go 64.00% (+3.13%) 25 (+2) 16 (+2) 9 👍
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/resources.go 81.48% (ø) 81 66 15
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources.go 80.00% (ø) 5 4 1
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_for_shard.go 87.76% (ø) 98 86 12
github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler.go 52.94% (+2.94%) 34 (+2) 18 (+2) 16 👍

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/operator/operands/admission/admission_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/admission/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/binder/binder_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_group_controller/pod_group_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/pod_grouper_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/pod_grouper/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/queue_controller/queue_controller_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/resources_test.go
  • github.com/NVIDIA/KAI-scheduler/pkg/operator/operands/scheduler/scheduler_test.go

@enoodle enoodle enabled auto-merge (squash) November 5, 2025 08:53
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.

4 participants