You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either (A) take into account the skipDrain at schedule time and just don't mark the node and don't plan any schedule
Or (B) return a specific error from drainer.Drain and check against this error to update the condition with Skipped instead of Completed and send a different type of event DrainSkipped
(B) is more code but a bit more verbose for the user, so I would be in favor of (B).
I can do the fix, what solution do you prefer?
The text was updated successfully, but these errors were encountered:
If
skipDrain
flag is set theDrain
activity is not performed and returns no error:https://github.com/planetlabs/draino/blob/master/internal/kubernetes/drainer.go#L262
As a consequence the Drain activity that was schedule thinks that the Drain was successfully performed :
https://github.com/planetlabs/draino/blob/master/internal/kubernetes/drainSchedule.go#L129
and the condition is updated with
Completed
and an event is fired withDrainSucceeded
:https://github.com/planetlabs/draino/blob/master/internal/kubernetes/drainSchedule.go#L151-L154
What can be done:
skipDrain
at schedule time and just don't mark the node and don't plan any scheduledrainer.Drain
and check against this error to update the condition withSkipped
instead ofCompleted
and send a different type of eventDrainSkipped
(B) is more code but a bit more verbose for the user, so I would be in favor of (B).
I can do the fix, what solution do you prefer?
The text was updated successfully, but these errors were encountered: