From 7ee93b4ad41ff4e305c0346b73da065312cc6fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20=C5=BByli=C5=84ski?= Date: Mon, 11 Mar 2024 15:14:33 +0100 Subject: [PATCH] Set "pd-balanced" as DefaultBootDiskType It is a default since v1.24 Ref: https://cloud.google.com/kubernetes-engine/docs/how-to/custom-boot-disks#specify --- cluster-autoscaler/cloudprovider/gce/gce_price_info.go | 5 +++-- cluster-autoscaler/cloudprovider/gce/gce_price_model_test.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/gce/gce_price_info.go b/cluster-autoscaler/cloudprovider/gce/gce_price_info.go index f47c906c91a6..a5c0c2baf5e7 100644 --- a/cluster-autoscaler/cloudprovider/gce/gce_price_info.go +++ b/cluster-autoscaler/cloudprovider/gce/gce_price_info.go @@ -546,8 +546,9 @@ var ( "pd-balanced": 0.100 / hoursInMonth, "pd-ssd": 0.170 / hoursInMonth, } - // DefaultBootDiskType is pd-standard disk type. - DefaultBootDiskType = "pd-standard" + // DefaultBootDiskType is pd-balanced disk type. + // ref: https://cloud.google.com/kubernetes-engine/docs/how-to/custom-boot-disks#specify + DefaultBootDiskType = "pd-balanced" ) // GcePriceInfo is the GCE specific implementation of the PricingInfo. diff --git a/cluster-autoscaler/cloudprovider/gce/gce_price_model_test.go b/cluster-autoscaler/cloudprovider/gce/gce_price_model_test.go index a0ff408477f2..360d3bdff0a9 100644 --- a/cluster-autoscaler/cloudprovider/gce/gce_price_model_test.go +++ b/cluster-autoscaler/cloudprovider/gce/gce_price_model_test.go @@ -110,7 +110,7 @@ func TestGetNodePrice(t *testing.T) { "custom node price scales linearly": { cheaperNode: testNode(t, "small_custom", "custom-1", 1000, 3.75*units.GiB, "", 0, false, false), expensiveNode: testNode(t, "large_custom", "custom-8", 8000, 30*units.GiB, "", 0, false, false), - priceComparisonCoefficient: 0.14, + priceComparisonCoefficient: 0.16, }, "custom node price scales linearly 2": { cheaperNode: testNode(t, "large_custom", "custom-8", 8000, 30*units.GiB, "", 0, false, false),