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

Removing label with policy deletion #62

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

togashidm
Copy link
Contributor

A new enforceable interface divides out some of the behavior of the
strategies allowing those strategies that are assessed and actioned
in a timed loop - like deschedule - to be handled under a new
interface that covers their enforcement and their cleanup when
the underlying policy is deleted. This fix may address
issue #29. For instance, when a policy with
deschedule strategy is not deleted, the node that is labeled as "violating"
not allowing schedule on that node. This fix makes violating nodes that
were labeled as "violating" removed when the respective policy is deleted.

A new enforceable interface divides out some of the behavior of the
strategies allowing those strategies that are assessed and actioned
in a timed loop - like deschedule - to be handled under a new
interface that covers their enforcement and their cleanup when
the underlying policy is deleted.

Co-authored-by:      togashidm <denisio.togashi@intel.com>
Co-authored-by: killianmuldoon <killian.muldoon@intel.com>
klog.V(2).InfoS(err.Error(), "component", "controller")
}
}
klog.V(2).InfoS(fmt.Sprintf("Remove the node label since the node was violating the policy %v", policyName), "component", "controller")
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 the part after "since" is confusing. Isn't this supposed to be removing "since the policy was deleted"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, I replace it to "Remove the node label on policy %v deletion."

Copy link
Contributor

@uniemimu uniemimu left a comment

Choose a reason for hiding this comment

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

lgtm

When a deschedule policy is deleted the violating nodes that
were labeled as "violating" need to be removed. New unit test
cases are created to test the issue and also testt the
capability of the node being relabelled, after policy deletion.
@uniemimu uniemimu merged commit a451073 into intel:master Oct 19, 2021
@togashidm togashidm deleted the node-unlabeling branch November 15, 2021 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants