kubernetes-sigs / karpenter

Karpenter is a Kubernetes Node Autoscaler built for flexibility, performance, and simplicity.
Apache License 2.0
540 stars 182 forks source link

Support new topologySpread scheduling constraints #430

Open tzneal opened 1 year ago

tzneal commented 1 year ago

Description

Observed Behavior:

Karpenter doesn't support:

These fields were introduced into beta in 1.27.

Expected Behavior:

Reproduction Steps (Please include YAML):

Versions:

sadath-12 commented 11 months ago

I'll work on this issue

jmdeal commented 9 months ago

/assign

jmdeal commented 9 months ago

/remove-help

ilkinmammadzada commented 7 months ago

What is current behaviour of the karpenter for nodeAffinityPolicy?

jmdeal commented 7 months ago

Currently Karpenter doesn't recognize either nodeAffinityPolicy, so it will always be treated as honor. Originally the linked PR was blocked on some 1.29 features and I haven't had the time to do the performance testing since we got unblocked on 1.29 testing. Those features have since been scoped out but the linked PR will add support for nodeAffinityPolicy, nodeTaintPolicy, and matchLabelKeys.

dominik-dezordo-vc commented 4 months ago

Hey everyone! Thanks for putting in the effort to support these new constraints! We just hit this exact issue in our clusters, where we are using matchLabelKeys together with topologySpreadConstraints to spread our pods across AZs.

I was wondering if you currently have a timeline for getting this PR merged? It seems the code is already ready for some time and it is just waiting for a rebase/performance test?

jmdeal commented 4 months ago

This has been backlogged for me for a little while, but I should have some bandwidth to get this wrapped out within the next week. Like you said, it really should only be performance testing and a rebase at this point that's left.

dominik-dezordo-vc commented 4 months ago

Amazing, thanks for the fast response. Really appreciate the work you are doing with karpenter!

pznamensky commented 3 months ago

We are also really awaiting for matchLabelKeys as now topologySpread is applied to all versions of a deployment which sometimes works not as optimal as we would like.

abrazouski commented 3 months ago

Hello everyone In my company, we heavily rely on the matchLabelKeys setting and we've also encountered similar issues when new pods of the rollout were in the Pending because Karpenter didn't respect the matchLabelKeys and made the calculations taking into account pods of the previous revision. It caused an incident during the night preventing us from applying hotfixes to the production workloads.

Could you please share the ETA of this feature?

hamishforbes commented 1 month ago

Hi, the lack of matchLabelKeys support, in particular, is also causing problems for us.

Is there anything we can do to help, test a custom build of Karpenter that supports this feature or something?