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:
  1. Verify NodePool instance type via kubectl get nodepools -o yaml

  2. Check if instance type is valid AWS instance type

  3. For scheduling failures, compare hardware tier memory with this max value

Resolution Guidance:
  1. If hardware tier memory exceeds max, reduce hardware tier memory or use larger instance

  2. For unknown instance types, update the EC2 instance data file

  3. Consider the 2574 MiB Domino overhead when configuring hardware tiers

References: