Skip to content

Commit

Permalink
Merge pull request #9090 from michalschott/8994-into-1.17
Browse files Browse the repository at this point in the history
manual cherry-pick #8994 into 1.17.
  • Loading branch information
k8s-ci-robot authored May 7, 2020
2 parents b002fc0 + 3a0fa15 commit 9eacbe3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/instancegroups/instancegroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,16 @@ func (r *RollingUpdateInstanceGroup) DrainNode(u *cloudinstances.CloudInstanceGr
}

if err := drain.RunCordonOrUncordon(helper, u.Node, true); err != nil {
if apierrors.IsNotFound(err) {
return nil
}
return fmt.Errorf("error cordoning node: %v", err)
}

if err := drain.RunNodeDrain(helper, u.Node.Name); err != nil {
if apierrors.IsNotFound(err) {
return nil
}
return fmt.Errorf("error draining node: %v", err)
}

Expand Down

0 comments on commit 9eacbe3

Please sign in to comment.