-
Notifications
You must be signed in to change notification settings - Fork 114
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
Fix MCP pause case and re-organize drain controller package #803
Conversation
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
90bd6d3
to
b216f97
Compare
Pull Request Test Coverage Report for Build 11935829798Details
💛 - Coveralls |
260e9f5
to
22f6efa
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.
Just a few minor comments, otherwise LGTM
controllers/helper_test.go
Outdated
@@ -1,330 +0,0 @@ | |||
/* |
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.
Why remove this file?
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.
this was related to the device plugin one I rebase this PR
controllers/drain_controller.go
Outdated
@@ -250,93 +169,17 @@ func (dr *DrainReconcile) getObject(ctx context.Context, req ctrl.Request, objec | |||
return true, nil | |||
} | |||
|
|||
func (dr *DrainReconcile) ensureAnnotationExists(ctx context.Context, object client.Object, key string) (string, error) { | |||
func (dr *DrainReconcile) ensureAnnotationExists(ctx context.Context, object client.Object, key string) (string, bool, error) { | |||
value, exist := object.GetAnnotations()[key] | |||
if !exist { | |||
err := utils.AnnotateObject(ctx, object, constants.NodeStateDrainAnnotationCurrent, constants.DrainIdle, dr.Client) |
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.
this should be
err := utils.AnnotateObject(ctx, object, key, constants.DrainIdle, dr.Client)
right?
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.
right nice catch!
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 checked the PR and I don't have meaningful comments. I think we are good to merge it when comments from Andrea are addressed.
Signed-off-by: Sebastian Sch <[email protected]>
22f6efa
to
9666ef9
Compare
Signed-off-by: Sebastian Sch <[email protected]>
9666ef9
to
8f45dce
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!
No description provided.