Skip to content

Commit

Permalink
enhance: Enable prefer node lables in resource group
Browse files Browse the repository at this point in the history
add prefer node labels in resource groups, so resource group will prefer
to accept some node with given label.

Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 committed Oct 18, 2024
1 parent 85ccff4 commit 4145fbf
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 40 deletions.
158 changes: 118 additions & 40 deletions go-api/rgpb/rg.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions proto/rg.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ message ResourceGroupTransfer {
string resource_group = 1; // resource groups can be transfered with current resource group.
// preserve for other option, such as weight, priority or affinity setup.
}

message ResourceGroupNodeFilter {
repeated string prefer_node_labels = 1; // node in resource group must match node labels requirements
}

message ResourceGroupConfig {
ResourceGroupLimit requests = 1; // requests node num in resource group, if node num is less than requests.nodeNum, it will be transfer from other resource group.
ResourceGroupLimit limits = 2; // limited node num in resource group, if node num is more than limits.nodeNum, it will be transfer to other resource group.
repeated ResourceGroupTransfer transfer_from = 3; // missing node should be transfer from given resource group at high priority in repeated list.
repeated ResourceGroupTransfer transfer_to = 4; // redundant node should be transfer to given resource group at high priority in repeated list.
ResourceGroupNodeFilter node_filter = 5; // node in resource group must match node filters, otherwise node should be move out
}

0 comments on commit 4145fbf

Please sign in to comment.