-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[feature] implementation of nodegroup and edgeapplication controller #3719
Conversation
@Congrool: GitHub didn't allow me to request PR reviews from the following users: vincentgoat, lonelyCZ. Note that only kubeedge members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
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. |
[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 |
628a9f8
to
6c221b3
Compare
cfeb283
to
785fb14
Compare
It has not been tested. |
2948932
to
68e9382
Compare
Signed-off-by: Congrool <chpzhangyifei@qq.com> Signed-off-by: Congrool <chpzhangyifei@zju.edu.cn>
Signed-off-by: Congrool <chpzhangyifei@qq.com> Signed-off-by: Congrool <chpzhangyifei@zju.edu.cn>
Signed-off-by: vincentgoat <linguohui1@huawei.com>
Signed-off-by: Congrool <chpzhangyifei@qq.com> Signed-off-by: Congrool <chpzhangyifei@zju.edu.cn>
Signed-off-by: Congrool <chpzhangyifei@qq.com> Signed-off-by: Congrool <chpzhangyifei@zju.edu.cn>
Signed-off-by: vincentgoat <linguohui1@huawei.com>
Already done test @Congrool |
Thanks. /unhold |
// SucceededSelection represents that this node has been selected as a member of this NodeGroup. | ||
SucceededSelection SelectionStatus = "Succeeded" | ||
// FailedSelection represents that this node failed to become a member of this NodeGroup. | ||
FailedSelection SelectionStatus = "Failed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the node hasn't been selected, it should not be included in the status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, only nodes selected by node name or labels will have their status in the nodegroup, and the statuses of these nodes have two situations, including SucceededSelection
and FailedSelection
.
Nodes that not selected by the nodegroup will not have their status entries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's the meaning of FailedSelection
? The node in nodegroup, but select failed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently there're two situations that will have FailedSelection
:
- Use node name to select the node, but the node does not exist. In this situation, we should notify the users.
- Select a node that already belongs to another nodegroup. We should make sure that one node can only belong to one nodegroup, so when user want to select a node that already blongs to another nodegroup, due to negligence or something else, we also should notify the users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey, sounds good, maybe we can add some comments later :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll add later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Looks good now, we can improve it in the future in practise.
/approve |
What type of PR is this?
/kind feature
/kind api-change
What this PR does / why we need it:
Implementation of feature at #3582.
This pr includes
This controller is implemented through
controller-runtime@v0.10.3
, it will watch node and nodegroup resources and do the reconcilation as follows:belonging-to
label on all its contained nodes and remove the finalizer.belonging-to
label to new added nodesbelonging-to
label on deleted nodesnode add/update/delete event will be translated to nodegroup event and reconcile as described above.
2022.4.6 CHANGELOG:
/cc @vincentgoat @fisherxu @lonelyCZ