Skip to content

Add generated new SKU type data #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jackfrancis
Copy link
Member

This PR updates the Azure resource API generator to include compute.SKU-formatted data, easily ingested by the Karpenter Azure provider. This enables easy maintenance of this generated list going forward in the event we want to include runtime VM SKU filtering for karpenter-provider-azure:

$ cd hack && go run ./generate_vmsize_testdata.go

Includes updated generated data against Azure public cloud from region westus2.

Copy link

@tallaxes tallaxes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generate part looks good, the regex update needs fixing - and maybe a separate PR?

vmsize.go Outdated
@@ -12,7 +12,7 @@ import (
// fetched using the ResourceSKU API, are not included here. They can be found in sku.go.

var skuSizeScheme = regexp.MustCompile(
`^([A-Z])([A-Z]?)([0-9]+)-?((?:[0-9]+)?)((?:[abcdilmtspPr]+|C+|NP)?)_?(?:([A-Z][0-9]+)_?)?(_cc_)?((?:[vV][1-9])?)?(_Promo)?$`,
`^([A-Z])([A-Z]?)([A-Z]?)([0-9]+)-?((?:[0-9]+)?)((?:[abcdeilmtspPr]+|C+|NP)?)_?(?:([A-Z][0-9]+)_?)?(_cc_)?(_[0-9]+_)?(_MI300X_)?(_H100_)?((?:[vV][1-9])?)?(_Promo)?$`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to have broken the associated tests - likely due to introduction of new groups, which shifts group numbers referenced in tests?

@jackfrancis
Copy link
Member Author

@tallaxes #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants