Skip to content
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

feat: add a way to exclude nodes #290

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Conversation

wangyizhi1
Copy link
Member

What type of PR is this?

/kind feature

What does this PR do?

feat: add a way to exclude nodes

Which issue(s) does this PR fix?

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@@ -43,15 +43,15 @@ type Reconciler struct {
var predicatesFunc = predicate.Funcs{
CreateFunc: func(createEvent event.CreateEvent) bool {
node := createEvent.Object.(*corev1.Node)
return !utils.IsKosmosNode(node)
return !utils.IsKosmosNode(node) && !utils.IsExcludeNode(node)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the problem of the before kosmos install, but in subsequent runs, if a node is changed from a normal node to a exclude node, this can lead to problems or potential bugs. For example, updates related to the node associated with the clustenode will not be synchronized.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could live a TODO here, and add detail description or issue. then we can merge this PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, currently, this label needs to be added before the controller-manager runs. I have created an issue for it and will further optimize it. #294

@hanweisen
Copy link
Contributor

/lgtm

@hanweisen
Copy link
Contributor

/approve

@kosmos-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hanweisen, wangyizhi1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kosmos-robot kosmos-robot merged commit 8ea772f into kosmos-io:main Nov 24, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants