reconcile instancegroup

This commit is contained in:
Leïla MARABESE 2023-08-29 16:29:08 +02:00
parent f0e90336ae
commit c02fb479dc
1 changed files with 4 additions and 1 deletions

View File

@ -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 {
@ -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
}