Add node management APIs: drain/undrain, taint/untaint, labels and automatic workload relocation - #25
Merged
miladhzzzz merged 2 commits intoJul 1, 2026
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Motivation
Description
AgentControlAPI and proto:DrainNode,UndrainNode,TaintNode,UntaintNode,SetNodeLabel, andDeleteNodeLabel, plus message types for taints, drain responses, and label operations inapi/proto/control.proto.Nodemodel and exposed them inNodeView, plus regenerated protobuf/gRPC stubs used by scheduler, gateway, and sharedpkgclients.MarkNodeDraining,MarkNodeReady,TaintNode,UntaintNode,SetNodeLabel,DeleteNodeLabel) and anupdateNodehelper that persists changes to etcd and updates the in-memory cache.Drainingstatus during heartbeats and made heartbeat responses setdrain_node=truewhen the node is inDrainingstate.NoSchedule-style taints fromselectNodeForWorkload()and addedRelocateWorkloadsFromNode()which automatically reassigns workloads when a node is markedDraining.internal/grpcapi/service.go) and gateway proxy methods/controllers (persys-gateway/services/*,controllers/*,routes/*) plus HTTP routes and JSON handlers for the new operations.Testing
make protoinpersys-schedulerandpersys-gatewayand regenerated dependentinternal/controlv1andpkg/scheduler/controlv1files successfully.cd persys-scheduler && go test ./internal/controlv1andcd persys-gateway && go test ./internal/controlv1, both completed without errors.go testacrossinternal/grpcapi,internal/scheduler, and gateway controller/service/routes packages which returned successfully (no failing tests).gofmtandgit diff --checkvalidations as part of the change workflow with no formatting or lint errors reported.Codex Task