Skip to content

Commit

Permalink
reconcile instancegroup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mia-Cross committed Aug 29, 2023
1 parent f0e9033 commit c02fb47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/instancegroups/instancegroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,9 @@ func (c *RollingUpdateCluster) drainTerminateAndWait(u *cloudinstances.CloudInst
}

// GCE often re-uses names, so we delete the node object to prevent the new instance from using the cordoned Node object
if c.Cluster.Spec.GetCloudProvider() == api.CloudProviderGCE && !isBastion && !c.CloudOnly {
// Scaleway has the same behavior
if (c.Cluster.Spec.GetCloudProvider() == api.CloudProviderGCE || c.Cluster.Spec.GetCloudProvider() == api.CloudProviderScaleway) &&
!isBastion && !c.CloudOnly {
if u.Node == nil {
klog.Warningf("no kubernetes Node associated with %s, skipping node deletion", instanceID)
} else {
Expand Down Expand Up @@ -473,6 +475,7 @@ func (c *RollingUpdateCluster) drainTerminateAndWait(u *cloudinstances.CloudInst
func (c *RollingUpdateCluster) reconcileInstanceGroup() error {
if c.Cluster.Spec.GetCloudProvider() != api.CloudProviderOpenstack &&
c.Cluster.Spec.GetCloudProvider() != api.CloudProviderHetzner &&
c.Cluster.Spec.GetCloudProvider() != api.CloudProviderScaleway &&
c.Cluster.Spec.GetCloudProvider() != api.CloudProviderDO {
return nil
}
Expand Down

0 comments on commit c02fb47

Please sign in to comment.