refactor: Use the scheduler backend to implement topology scheduling#515
Merged
Conversation
8d91bda to
00cefd7
Compare
8 tasks
6f6e833 to
7b4d7bf
Compare
Scheduler backends that manage topology CRDs implement this interface. The ClusterTopology controller will type-assert backends to delegate scheduler-specific topology resource management. SyncTopology and OnTopologyDelete accept a k8sClient parameter so callers can provide a non-cached client before the manager cache starts. If nil, the backend falls back to its own (cached) client. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Erez Freiberger <enoodle@gmail.com>
Returns all registered scheduler backends as a map keyed by name. This enables the ClusterTopology controller to iterate all backends and delegate topology management to those that support it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Erez Freiberger <enoodle@gmail.com>
Moves KAI-specific topology logic (create, update via delete+recreate, owner reference management) from clustertopology package into the KAI scheduler backend. The backend now satisfies the TopologyAwareSchedBackend optional interface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Erez Freiberger <enoodle@gmail.com>
7b4d7bf to
dd45fcf
Compare
Collaborator
|
Thanks will review it. |
danbar2
previously approved these changes
Apr 9, 2026
shayasoolin
reviewed
Apr 9, 2026
shayasoolin
previously approved these changes
Apr 9, 2026
SynchronizeTopology now iterates all registered backends and delegates scheduler-specific topology management to those implementing TopologyAwareSchedBackend. KAI-specific logic removed from the clustertopology package — it now lives in the KAI backend. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Erez Freiberger <enoodle@gmail.com>
dd45fcf to
98d9701
Compare
danbar2
approved these changes
Apr 9, 2026
shayasoolin
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Refactor the topolgoy aware scheduling code to use the scheduler backend interfaces, adding a new interface TopologyAwareSchedBackend.
This is a first step into the implementation of the updated Topology Aware Scheduling design
Which issue(s) this PR fixes:
References #369
Special notes for your reviewer:
Does this PR introduce a API change?
NONE
Additional documentation e.g., enhancement proposals, usage docs, etc.: