-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: Fix pointer mutation causing incorrect maxPods values #7020
fix: Fix pointer mutation causing incorrect maxPods values #7020
Conversation
Pull Request Test Coverage Report for Build 10887984482Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/karpenter snapshot
Snapshot successfully published to
|
In which release can we expect this fix? |
Fixes #7011
Fixes #6890
Fixes #6979
Description
This PR fixes a bug where both
GetKubeletConfigurationWithNodeClaim
andGetKubeletConfigurationWithNodePool
were returning thenodeClass.Spec.Kubelet
back to the caller when Kubelet was specified and there was no Kubelet compatibility annotation.This would be fine; however, this call returned back the original pointer for the Kubelet data -- meaning that any caller could then mutate the original data for other callers without knowing it. In this case, the launch template resolver was inadvertently mutating the maxPods data across instance type combinations, leading to incorrect maxPods values being specified sometimes.
How was this change tested?
make presubmit
Does this change impact docs?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.