amazon-eks-ami icon indicating copy to clipboard operation
amazon-eks-ami copied to clipboard

feat(al2/bootstrap): add dedicated flag for max pods

Open mselim00 opened this issue 6 months ago • 0 comments

Issue #, if available:

Description of changes: Creates a new CLI flag for setting max pods. This is mainly to handle the case where a user wants to customize max pods independent of what we would set (including if they want to use the existing max-pods-calculator.sh) and ensure that the system reserved logic gets updated accordingly.

Memory reserved is calculated as a linear function of max pods (11 * maxPods + 255). If max pods is passed in kubelet-extra-args, we still calculate memory reserved based on the default maxPods value -- either retrieved from eni-max-pods.txt, or computed from equivalently computed from DescribeInstanceType call if that's not set. It's messy to try to parse the flag out of that list of flags, so this instead adds a flag to better capture the functionality, and also makes it opt-in to avoid a shift in functionality for users who might have indirectly come to rely on the omission.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

mselim00 avatar Jun 11 '25 02:06 mselim00