Skip to content

Add generated new SKU type data#25

Open
jackfrancis wants to merge 1 commit into
Azure:mainfrom
jackfrancis:generate-sku-data
Open

Add generated new SKU type data#25
jackfrancis wants to merge 1 commit into
Azure:mainfrom
jackfrancis:generate-sku-data

Conversation

@jackfrancis
Copy link
Copy Markdown
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
Copy Markdown

@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?

Comment thread vmsize.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
Copy Markdown

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
Copy Markdown
Member Author

@tallaxes #26

Signed-off-by: Jack Francis <jackfrancis@gmail.com>
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.

3 participants