Open myaser opened 3 months ago
Hi @myaser, I was able to track this down. It definitely is a bug since we are not considering all affinities for calculating daemonset resources. Do you have a workaround for your use-case that can get you unblocked on this?
Hi @myaser, I was able to track this down. It definitely is a bug since we are not considering all affinities for calculating daemonset resources. Do you have a workaround for your use-case that can get you unblocked on this?
for my specific case, I just flipped the order of the affinities. since the other affinity is meant for cluster autoscaler.
since we are in a middle of migration we run both CA (legacy) and Karpenter together.
/triage accepted
Description
Observed Behavior: I craeted a daemonset that has the following nodeAffinity
observing karpenter logs and experimenting with scheduling pods of different sizes, I could find that karpenter's calculations for daemonset resources excludes this pod
I could confirm this by checking the code.
here it is reading only the first of the affinities relying on an outer loop to remove the first affinity and continue with the next one
but, this is not happening for daemonset calculation as shown here
to validate my findings, I flipped the affinities order and the calculations were corrected
Expected Behavior: all affinities should be considered for calculating daemonset resources
Reproduction Steps (Please include YAML):
Versions:
karpenter Version: 0.36.2
Kubernetes Version (
kubectl version
): v1.30.2Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment