Azure / karpenter-provider-azure

AKS Karpenter Provider
Apache License 2.0
308 stars 47 forks source link

Adding subnet selector functionality #333

Open midaslmg94 opened 2 months ago

midaslmg94 commented 2 months ago

Tell us about your request

I am currently working with the AKSNodeClasses CRD, which only includes the properties imageFamily, imageVersion, osDiskSizeGB, and tags. For enhanced functionality, it would be beneficial to add a subnetSelector property.

This addition would enable scaling nodes within specific subnets, a feature not currently supported by AKSNodeClasses. I noticed that EC2NodeClass already supports this through subnetSelectorTerms (as detailed here: Karpenter Documentation). Implementing a similar functionality in AKSNodeClasses could provide more flexibility and control over node deployment in various subnet environments.

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?

no

Are you currently working around this issue?

no

Additional Context

No response

Attachments

No response

Community Note

Bryce-Soghigian commented 2 months ago

Hi @midaslmg94 thanks for opening an issue! I am working on adding subnet support per nodeclass. The PR for this is out and can be viewed here: https://github.com/Azure/karpenter-provider-azure/pull/314/files.

This would allow you to specify a subnet in the AKSNodeClass via the subnets ARM Resource ID. We will not be supporting tags based selection, but you will be able to specify a subnet per nodeclass.

Is this sufficient? Does it solve for your usecase?