-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conversation
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>
74acbe3
to
dc8fc96
Compare
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") |
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 think the part after "since" is confusing. Isn't this supposed to be removing "since the policy was deleted"
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.
sure, I replace it to "Remove the node label on policy %v deletion."
dc8fc96
to
298deb0
Compare
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
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.
298deb0
to
c704c73
Compare
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.