domino_admin_toolkit.checks.info.test_karpenter_nodepool_memory module
- domino_admin_toolkit.checks.info.test_karpenter_nodepool_memory.nodepool_max_workload_memory_data(k8s_client)
Retrieves NodePool instance types and calculates maximum hardware tier memory.
This fixture calculates the maximum memory that can be requested by a hardware tier for each NodePool, accounting for: - Karpenter system overhead (7.5% + base + per-pod reservations) - Domino sidecar containers (istio-proxy, executor, nginx = 2574 MiB)
- Formula:
Karpenter Available = EC2_memory * 0.925 - (255 + 11 * MAX_PODS) Max HW Tier Memory = Karpenter Available - 2574 MiB
Requires read access to Karpenter NodePool custom resources.
- domino_admin_toolkit.checks.info.test_karpenter_nodepool_memory.test_nodepool_max_workload_memory(karpenter_enabled, nodepool_max_workload_memory_data)
- Purpose:
Displays the maximum hardware tier memory that can be scheduled on each NodePool. This helps administrators understand the memory headroom available for workloads after accounting for Karpenter and Domino system overhead.
- Background:
When Karpenter provisions a node, not all EC2 memory is available for workloads: - Karpenter reserves: 7.5% system overhead + 255 MiB base + 11 MiB per pod - Domino reserves: 2574 MiB for sidecars (istio-proxy, executor, nginx)
- Formula:
Karpenter Available = EC2_memory * 0.925 - (255 + 11 * MAX_PODS) Max HW Tier Memory = Karpenter Available - 2574 MiB
- Data Interpretation:
EC2 Memory: Raw memory of the instance type
MAX_PODS: Maximum pods supported (based on ENI limits)
Karpenter Available: Memory after Karpenter reservations
Max HW Tier Memory: Maximum memory a hardware tier can request
- Failure Conditions:
Unknown instance type (not in EC2 instance data)
- Troubleshooting Steps:
Verify NodePool instance type via kubectl get nodepools -o yaml
Check if instance type is valid AWS instance type
For scheduling failures, compare hardware tier memory with this max value
- Resolution Guidance:
If hardware tier memory exceeds max, reduce hardware tier memory or use larger instance
For unknown instance types, update the EC2 instance data file
Consider the 2574 MiB Domino overhead when configuring hardware tiers
- References:
Karpenter memory formula: https://github.com/aws/karpenter-provider-aws/issues/7929
MAX_PODS calculation: https://github.com/awslabs/amazon-eks-ami