Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions modules/infra/eks/templates/node_pool.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ metadata:
spec:
template:
spec:
# The EBS CSI node plugin removes this taint after it is ready. Marking
# it as a startup taint prevents Karpenter from provisioning duplicate
# nodes while the plugin is still initializing.
startupTaints:
- key: ebs.csi.aws.com/agent-not-ready
effect: NoExecute
requirements:
- key: karpenter.k8s.aws/instance-family
operator: In
Expand Down
6 changes: 6 additions & 0 deletions modules/platform/arc/templates/node_pool.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
forge.local/scale_set_type: dind
forge.local/tenant: ${tenant}
spec:
# The EBS CSI node plugin removes this taint after it is ready. Marking
# it as a startup taint prevents Karpenter from provisioning duplicate
# nodes while the plugin is still initializing.
startupTaints:
- key: ebs.csi.aws.com/agent-not-ready
effect: NoExecute
requirements:
${replace(trimspace(yamlencode(requirements)), "\n", "\n ")}
nodeClassRef:
Expand Down
9 changes: 9 additions & 0 deletions modules/platform/arc/tests/behavior.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ run "arc_single_runner_contract" {
)
error_message = "ARC root module must record non-migration Karpenter trigger values."
}

assert {
condition = (
strcontains(file("${path.module}/templates/node_pool.yaml.tpl"), "startupTaints:")
&& strcontains(file("${path.module}/templates/node_pool.yaml.tpl"), "ebs.csi.aws.com/agent-not-ready")
&& strcontains(file("${path.module}/templates/node_pool.yaml.tpl"), "effect: NoExecute")
)
error_message = "Each tenant Karpenter NodePool must declare the EBS CSI bootstrap taint as a startup taint."
}
}

run "arc_migration_contract" {
Expand Down
Loading