Skip to content

Commit 30a2a7d

Browse files
fix: supporting Ephemeral OS Disk placement (#940)
* fix: should set disk placement ourselves rather than defaulting from CRP * fix: placement got appended in requirements * test: adding tests for more ephemeral disk scenarios * test: adding skus * feat: adding ephemeral os disk support for v6 * test: adding an e2e test for ephemeral disk * fix: make test * fix: migrating to southcentralus * fix: adding supports nvme * fix: using the correct placement now * fix: node bootstrapping test from rebase needs to use v5 * fix: removing bryce * fix: removing skewer dep and fixing operator * fix: removing find sub * Update pkg/providers/instancetype/suite_test.go * fix: status * fix: update skewer location in go mod * test: adding back the placement tests * fix: placement ammended test cases * fix: ci lint * test: removing unused test case * fix: maybe time to put down the LLM * fix: simplifying logic * test: testing FindMaxEphemeralSizeGB * test: updating golint ignore statement * test: adding another edge case for MaxResourceVolumeMB * fix: saving some cpu * test: adding edge case for Nil SKU * Update pkg/providers/instancetype/instancetypes.go * Update pkg/providers/instancetype/suite_test.go Co-authored-by: Alex Leites <[email protected]> * refactor: no longer exporting the functions * Update pkg/providers/instancetype/suite_test.go Co-authored-by: Alex Leites <[email protected]> * fix: using non float value in e2e * fix: removing duplicate test case --------- Co-authored-by: Alex Leites <[email protected]>
1 parent 0d0cc2e commit 30a2a7d

37 files changed

+3994
-2355
lines changed

hack/codegen.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ skugen() {
3232
NO_UPDATE=" pkg/fake/zz_generated.sku.$location.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)"
3333
SUBJECT="SKUGEN"
3434

35-
go run hack/code/instancetype_testdata_gen/main.go -- "${GENERATED_FILE}" "$location" "Standard_B1s,Standard_A0,Standard_D2_v2,Standard_D2_v3,Standard_DS2_v2,Standard_D2s_v3,Standard_D2_v5,Standard_D16plds_v5,Standard_F16s_v2,Standard_NC6s,Standard_NC6s_v3,Standard_NC16as_T4_v3,Standard_NC24ads_A100_v4,Standard_M8-2ms,Standard_D4s_v3,Standard_D64s_v3,Standard_DC8s_v3,Standard_D2as_v6"
35+
go run hack/code/instancetype_testdata_gen/main.go -- "${GENERATED_FILE}" "$location" "Standard_B1s,Standard_A0,Standard_D2_v2,Standard_D2_v3,Standard_DS2_v2,Standard_D2s_v3,Standard_D2_v5,Standard_D16plds_v5,Standard_E4d_v5,Standard_B20ms,Standard_F16s_v2,Standard_NC6s,Standard_NC6s_v3,Standard_NC16as_T4_v3,Standard_NC24ads_A100_v4,Standard_M8-2ms,Standard_D4s_v3,Standard_D64s_v3,Standard_DC8s_v3,Standard_D2as_v6"
3636
go fmt "${GENERATED_FILE}"
3737

3838
GIT_DIFF=$(git diff --stat "${GENERATED_FILE}")
@@ -49,7 +49,7 @@ skugen-all() {
4949
fi
5050

5151
# run skugen for selected regions
52-
skugen eastus
52+
skugen southcentralus # region with Standard_E4d_v5
5353
skugen westcentralus # non-zonal region
5454
}
5555

pkg/cloudprovider/cloudprovider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"sigs.k8s.io/controller-runtime/pkg/log"
3838

3939
// nolint SA1019 - deprecated package
40-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
40+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
4141

4242
"github.com/Azure/karpenter-provider-azure/pkg/apis"
4343
"github.com/Azure/karpenter-provider-azure/pkg/apis/v1beta1"

pkg/controllers/nodeclaim/garbagecollection/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
"github.com/awslabs/operatorpkg/object"
2828

29-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
29+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
3030
"github.com/Azure/karpenter-provider-azure/pkg/apis"
3131
"github.com/Azure/karpenter-provider-azure/pkg/apis/v1beta1"
3232
"github.com/Azure/karpenter-provider-azure/pkg/cloudprovider"

pkg/controllers/nodeclaim/inplaceupdate/controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535

3636
"sigs.k8s.io/karpenter/pkg/operator/injection"
3737

38-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
38+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
3939

4040
"github.com/Azure/karpenter-provider-azure/pkg/apis/v1beta1"
4141
"github.com/Azure/karpenter-provider-azure/pkg/operator/options"

pkg/controllers/nodeclaim/inplaceupdate/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"context"
2121
"testing"
2222

23-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
23+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
2424
. "github.com/onsi/ginkgo/v2"
2525
. "github.com/onsi/gomega"
2626
"github.com/samber/lo"

pkg/controllers/nodeclaim/inplaceupdate/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"k8s.io/apimachinery/pkg/util/sets"
2525
karpv1 "sigs.k8s.io/karpenter/pkg/apis/v1"
2626

27-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
27+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
2828
"github.com/Azure/karpenter-provider-azure/pkg/operator/options"
2929
)
3030

pkg/fake/azureresourcegraphapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/samber/lo"
2424

25-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
25+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
2626
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork"
2727
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph"
2828
"github.com/Azure/karpenter-provider-azure/pkg/providers/instance"

pkg/fake/azureresourcegraphapi_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"fmt"
2222
"testing"
2323

24-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
24+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
2525
"github.com/Azure/karpenter-provider-azure/pkg/providers/instance"
2626
"github.com/samber/lo"
2727
"github.com/stretchr/testify/assert"

pkg/fake/pricingapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/Azure/karpenter-provider-azure/pkg/providers/pricing/client"
2525
)
2626

27-
const Region = "eastus"
27+
const Region = "southcentralus"
2828
const RegionNonZonal = "westcentralus"
2929

3030
type PricingAPI struct {

pkg/fake/skus_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
)
2424

2525
func TestSKUExistence(t *testing.T) {
26-
testSKUExistenceForRegion(t, "eastus", sets.New(
26+
testSKUExistenceForRegion(t, "southcentralus", sets.New(
2727
"Standard_A0",
2828
"Standard_B1s",
2929
"Standard_D2s_v3",

0 commit comments

Comments
 (0)