return success if cordon node by replace
Kubernetes-commit: c825e8ec16482ebbefc3ae96a26f4dcf924e750c
This commit is contained in:
parent
4c8a09d650
commit
9cc15e588a
|
@ -58,11 +58,11 @@ func RunCordonOrUncordon(drainer *Helper, node *corev1.Node, desired bool) error
|
|||
}
|
||||
|
||||
err, patchErr := c.PatchOrReplace(drainer.Client, false)
|
||||
if patchErr != nil {
|
||||
return patchErr
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
if patchErr != nil {
|
||||
return fmt.Errorf("cordon error: %s; merge patch error: %s", err.Error(), patchErr.Error())
|
||||
}
|
||||
return fmt.Errorf("cordon error: %s", err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue