-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP]feature: Create hyperNode cr by node label #3890
base: master
Are you sure you want to change the base?
[WIP]feature: Create hyperNode cr by node label #3890
Conversation
Please review it and give me some feedback, thanks! @Monokaix @william-wang @wangyang0616 @penggu |
808109d
to
8cd0edd
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4b37f25
to
ce1bf5c
Compare
Wouldn't it be better if label Each key corresponds to a value, which looks clearer. HyperSwitch CRD can also support more scenarios in the future. |
Add a CRD will become more complicated, after discussing with @Monokaix @penggu, we decide to redesign this label later, in this version of network topology, this PR may not be get merged. |
Signed-off-by: JesseStutler <chenzicong4@huawei.com>
Signed-off-by: JesseStutler <chenzicong4@huawei.com>
ce1bf5c
to
840a08f
Compare
@JesseStutler: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
feature: #3888
The hypernode controller will list/watch node(only node with label
volcano.sh/hypernodes
will be list/watched) and hypernode, the format of labelvolcano.sh/hypernode
is "hypernode-0,hypernode-1,...,hypernode-0`, use commas to separate the hypernodes of different layers that the node is connected to, from near to far, the front hypernode means the closer to the node.Take this picture as an example:
Create Hypernodes Tree
volcano.sh/hypernodes:"s0,s4,s6"
, then hypernode controller judge there is no s0,s4,s6 hypernodes created, it will create them sequentially( use hyperNodeAction)Update Hypernode Tree
Currently, we only allow node label to change tier 1 hypernode, e.g., node-0's label can only from "s0,s4,s6" to "s1,s4,s6", that is, only allowed to change the node's parent hypernode, we don't allow to change the hypernode tier>1, like from "s0,s4,s6" to "s0,s5,s6". And we don't allow to add more hypernode or delete some hypernodes, like "s0,s4,s6" to "s0,s4" or from "s0,s4,s6" to "s0,s4,s6,s7", it may cause some strange hypernode tree structure, and then causing strange scheduling.
Now, I only designed the hypernode controller to have one goroutine to handle the node's events. If there are multiple goroutines processing events at the same time, it may cause multiple create requests of the same hypernode to be issued at the same time. Even if there is only one goroutine processing events, when the hypernode create/update requests is already sent to the api-server, the controller may still not have list/watch add/update/delete hypernode events to the hypernode controller yet, so I added hyperNodesCache. After the hypernode create/update/delete request is sent, the local cache will be updated.After hypernode create/update/delete events arriving, the controller will overwride the hypernode in cache.