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

Option to not force drain a node from kubernetes #52

Closed
gregsidelinger opened this issue Feb 2, 2021 · 1 comment · Fixed by #53
Closed

Option to not force drain a node from kubernetes #52

gregsidelinger opened this issue Feb 2, 2021 · 1 comment · Fixed by #53

Comments

@gregsidelinger
Copy link

err = drain.Drain(k.clientset, []*corev1.Node{node}, &drain.DrainOptions{
IgnoreDaemonsets: k.ignoreDaemonSets,
GracePeriodSeconds: -1,
Force: true,
DeleteLocalData: k.deleteLocalData,
})

Would it be possible to create an option to not force delete standalone pods? We have a bunch of short term running pods that are not managed by a deployment or job that should be given a chance to finish running. Since there is no backing deployment I can not use a Pod Disruption Budget to instruct kube to not delete them so setting the force=false and trying again later is the only option I can think of.

@deitch
Copy link
Owner

deitch commented Feb 4, 2021

Certainly. The hardest part about this usually is the user interface, with everything in env vars, but we don't have too many, so it shouldn't be too bad. Maybe ROLLER_PREVENT_DRAIN or similar?

Go for a PR.

helgi added a commit to helgi/aws-asg-roller that referenced this issue May 6, 2021
Introduces ROLLER_DRAIN and ROLLER_DRAIN_FORCE, both defaulting to true to keep existing behaviour for compatibility

Fixes deitch#52
helgi added a commit to helgi/aws-asg-roller that referenced this issue May 6, 2021
Introduces ROLLER_DRAIN and ROLLER_DRAIN_FORCE, both defaulting to true to keep existing behaviour for compatibility

Fixes deitch#52
helgi added a commit to helgi/aws-asg-roller that referenced this issue May 8, 2021
Introduces ROLLER_DRAIN and ROLLER_DRAIN_FORCE, both defaulting to true to keep existing behaviour for compatibility

Fixes deitch#52
helgi added a commit to helgi/aws-asg-roller that referenced this issue Jun 7, 2021
Introduces ROLLER_DRAIN and ROLLER_DRAIN_FORCE, both defaulting to true to keep existing behaviour for compatibility

Fixes deitch#52
@deitch deitch closed this as completed in #53 Jun 7, 2021
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 a pull request may close this issue.

2 participants