Skip to content

Commit

Permalink
Fix Autoscaling for worker nodes with invalid ProviderID
Browse files Browse the repository at this point in the history
This change fixes a bug that arises when the user's cluster includes worker nodes not from Hetzner Cloud, such as a Hetzner Dedicated server or any server resource other than Hetzner. It also corrects the behavior when a server has been physically deleted from Hetzner Cloud.

Signed-off-by: Maksim Paskal <paskal.maksim@gmail.com>
  • Loading branch information
maksim-paskal committed Apr 16, 2024
1 parent 59882e0 commit 17105a0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package hetzner

import (
"context"
"errors"
"strconv"
"sync"
"time"
Expand Down Expand Up @@ -136,7 +135,8 @@ func (m *serversCache) getServer(nodeIdOrName string) (*hcloud.Server, error) {
}
}

return nil, errors.New("server not found")
// return nil if server not found
return nil, nil
}

func (m *serversCache) getServersByNodeGroupName(nodeGroup string) ([]*hcloud.Server, error) {
Expand Down

0 comments on commit 17105a0

Please sign in to comment.