diff --git a/cluster-autoscaler/cloudprovider/hetzner/hetzner_cloud_provider.go b/cluster-autoscaler/cloudprovider/hetzner/hetzner_cloud_provider.go index ad9e35d2e85e..046a8b456e81 100644 --- a/cluster-autoscaler/cloudprovider/hetzner/hetzner_cloud_provider.go +++ b/cluster-autoscaler/cloudprovider/hetzner/hetzner_cloud_provider.go @@ -41,7 +41,6 @@ const ( providerIDPrefix = "hcloud://" nodeGroupLabel = hcloudLabelNamespace + "/node-group" hcloudLabelNamespace = "hcloud" - drainingNodePoolId = "draining-node-pool" serverCreateTimeoutDefault = 5 * time.Minute serverRegisterTimeout = 10 * time.Minute defaultPodAmountsLimit = 110 diff --git a/cluster-autoscaler/cloudprovider/hetzner/hetzner_manager.go b/cluster-autoscaler/cloudprovider/hetzner/hetzner_manager.go index a4071b213792..fd4b4eea1b7d 100644 --- a/cluster-autoscaler/cloudprovider/hetzner/hetzner_manager.go +++ b/cluster-autoscaler/cloudprovider/hetzner/hetzner_manager.go @@ -206,16 +206,6 @@ func newManager() (*hetznerManager, error) { cachedServers: newServersCache(ctx, client), } - m.nodeGroups[drainingNodePoolId] = &hetznerNodeGroup{ - manager: m, - instanceType: "cx11", - region: "fsn1", - targetSize: 0, - maxSize: 0, - minSize: 0, - id: drainingNodePoolId, - } - return m, nil } @@ -252,11 +242,6 @@ func (m *hetznerManager) deleteServer(server *hcloud.Server) error { return err } -func (m *hetznerManager) addNodeToDrainingPool(node *apiv1.Node) (*hetznerNodeGroup, error) { - m.nodeGroups[drainingNodePoolId].targetSize += 1 - return m.nodeGroups[drainingNodePoolId], nil -} - func (m *hetznerManager) validProviderID(providerID string) bool { return strings.HasPrefix(providerID, providerIDPrefix) } diff --git a/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go b/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go index 4fe799dbb196..1740f87de208 100644 --- a/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go +++ b/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go @@ -287,7 +287,7 @@ func (n *hetznerNodeGroup) TemplateNodeInfo() (*schedulerframework.NodeInfo, err } node.Labels = cloudprovider.JoinStringMaps(node.Labels, nodeGroupLabels) - if n.manager.clusterConfig.IsUsingNewFormat && n.id != drainingNodePoolId { + if n.manager.clusterConfig.IsUsingNewFormat { for _, taint := range n.manager.clusterConfig.NodeConfigs[n.id].Taints { node.Spec.Taints = append(node.Spec.Taints, apiv1.Taint{ Key: taint.Key, @@ -391,7 +391,7 @@ func buildNodeGroupLabels(n *hetznerNodeGroup) (map[string]string, error) { nodeGroupLabel: n.id, } - if n.manager.clusterConfig.IsUsingNewFormat && n.id != drainingNodePoolId { + if n.manager.clusterConfig.IsUsingNewFormat { maps.Copy(labels, n.manager.clusterConfig.NodeConfigs[n.id].Labels) }