Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update default reserved memory calculation to match new calculation u…
…sed in amazon-eks-ami The reserved memory calculation was recently changed in amazon-eks-ami to be based on pod density (11*maxPodsPerNode+255) instead of total memory. See https://github.com/awslabs/amazon-eks-ami/blob/21426e27e3845319dbca92e7df32e5c4b984a1d1/files/bootstrap.sh#L163 This commit introduces a new property on InstanceTypeInfo to store MaxPodsPerNode and populates it using the already available data that has been generated into maxpods.go. Because the image type specs (cpu, memory) come from an API call the the max number of pods per node comes from a file in amaxon-eks-ami, there is a chance that an image type is returned by the API for which there is no corresponding record in maxpods.go. To handle this, I left the original memory calculation in place as a fallback that will be used if max pods per node cannot be determined. Issue eksctl-io#2395
- Loading branch information