Skip to content

Commit

Permalink
[v1.28][Hetzner] Fix missing ephemeral storage definition
Browse files Browse the repository at this point in the history
This fixed requests for pods with ephemeral storage requests being denied due to insufficient ephemeral storage for the Hetzner provider.

Backport of kubernetes#6574 to `v1.28` branch.
  • Loading branch information
Silvest89 authored and apricote committed Apr 2, 2024
1 parent 92c182f commit 079755e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 079755e

Please sign in to comment.