Skip to content

bug(AL2023): nodeadm: max-pods calculation doesn't account for custom networking in AL2023 #2201

@shvbsle

Description

@shvbsle

What happened:
ln al2023 the max-pods calculation in nodeadm doesn't take into account custom networking configurations (CNI_CUSTOM_NETWORKING_ENABLED) which causes incorrect pod calculations.

What you expected to happen:
The max-pods calculation code for al2023 should consider custom networking configuration and exclude the primary ENI from the calculation when custom networking is enabled, similar to how it worked in AL2 with the max-pods-calculator.sh script.

If I understand it correctly the shell script does this:
Assume: 3 enis, 12 IPs per eni:
In Al2 shell script it would be: 2 * (12-1) + 2 =24
In AL2023 it is currently this: 3 *(12-1) + 2 = 35

Additionally, the current implementation is missing other features from AL2's calculator:

  • prefix delegation support
  • max ENI configuration support
  • network card-specific handling

How to reproduce it (as minimally and precisely as possible):

Environment:

  • AWS Region:
  • Instance Type(s):
  • Cluster Kubernetes version:
  • Node Kubernetes version:
  • AMI Version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions