mirror of https://github.com/kubernetes/kops.git
Only delete node object on GCE
This commit is contained in:
parent
437c2347ad
commit
2ba9c1670f
|
|
@ -409,9 +409,8 @@ func (c *RollingUpdateCluster) drainTerminateAndWait(u *cloudinstances.CloudInst
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We unregister the node before deleting it; if the replacement comes up with the same name it would otherwise still be cordoned
|
// GCE often re-uses names, so we delete the node object to prevent the new instance from using the cordoned Node object
|
||||||
// (It often seems like GCE tries to re-use names)
|
if c.Cluster.Spec.GetCloudProvider() == api.CloudProviderGCE && !isBastion && !c.CloudOnly {
|
||||||
if !isBastion && !c.CloudOnly {
|
|
||||||
if u.Node == nil {
|
if u.Node == nil {
|
||||||
klog.Warningf("no kubernetes Node associated with %s, skipping node deletion", instanceID)
|
klog.Warningf("no kubernetes Node associated with %s, skipping node deletion", instanceID)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue