Skip to content

Instantly share code, notes, and snippets.

@dblooman
Last active May 16, 2019 15:26
Show Gist options
  • Save dblooman/79f61335ab4ff45ea7e92835f3d64651 to your computer and use it in GitHub Desktop.
Save dblooman/79f61335ab4ff45ea7e92835f3d64651 to your computer and use it in GitHub Desktop.
err = drain.Drain(clientset, []*corev1.Node{node}, &drain.DrainOptions{
IgnoreDaemonsets: true,
DeleteLocalData: true,
GracePeriodSeconds: -1,
Force: true,
Logger: ilog.New(),
// Timeout of 0 means infinite. The draining is pretty quick, so I expect it to complete within
// the execution duration of the lambda.
Timeout: 0,
})
if err != nil {
panic(err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment