From 6c476b0321b2a129eda2deb90351dca4f8fff23a Mon Sep 17 00:00:00 2001 From: Johnnie Ho Date: Mon, 4 Mar 2024 02:20:47 -0800 Subject: [PATCH] [v1.27][Hetzner] Fix missing ephemeral storage definition This fixed requests for pods with ephemeral storage requests being denied due to insufficient ephemeral storage for the Hetzner provider. Backport of #6574 to `v1.27` branch. --- .../cloudprovider/hetzner/hetzner_node_group.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go b/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go index 19052e9cf5c0..8cac65c6c405 100644 --- a/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go +++ b/cluster-autoscaler/cloudprovider/hetzner/hetzner_node_group.go @@ -343,10 +343,10 @@ func getMachineTypeResourceList(m *hetznerManager, instanceType string) (apiv1.R return apiv1.ResourceList{ // TODO somehow determine the actual pods that will be running - apiv1.ResourcePods: *resource.NewQuantity(defaultPodAmountsLimit, resource.DecimalSI), - apiv1.ResourceCPU: *resource.NewQuantity(int64(typeInfo.Cores), resource.DecimalSI), - apiv1.ResourceMemory: *resource.NewQuantity(int64(typeInfo.Memory*1024*1024*1024), resource.DecimalSI), - apiv1.ResourceStorage: *resource.NewQuantity(int64(typeInfo.Disk*1024*1024*1024), resource.DecimalSI), + apiv1.ResourcePods: *resource.NewQuantity(defaultPodAmountsLimit, resource.DecimalSI), + apiv1.ResourceCPU: *resource.NewQuantity(int64(typeInfo.Cores), resource.DecimalSI), + apiv1.ResourceMemory: *resource.NewQuantity(int64(typeInfo.Memory*1024*1024*1024), resource.DecimalSI), + apiv1.ResourceEphemeralStorage: *resource.NewQuantity(int64(typeInfo.Disk*1024*1024*1024), resource.DecimalSI), }, nil }