fix: substitute the EC2NodeClass placeholders in staging and production#15
Merged
Merged
Conversation
The base karpenter-resources EC2NodeClass carries ${CLUSTER_NAME} and
${ENVIRONMENT} placeholders. The dev overlay patches the EC2NodeClass with
concrete values, but the staging and production overlays only defined a
karpenter-config configMapGenerator — and nothing ever consumed it (no
replacements block, no substitution plugin). The rendered staging and
production EC2NodeClass therefore shipped the literal strings:
`role: ${CLUSTER_NAME}-karpenter-node` and tag selectors keyed on
${CLUSTER_NAME}, so Karpenter could not resolve an instance-profile role
or match any subnet / security group — node provisioning would fail. The
unconsumed configMapGenerator also emitted an orphan ConfigMap into
kube-system.
Both overlays now patch the EC2NodeClass with their concrete cluster name
and environment, exactly as the dev overlay does, and the dead
configMapGenerator is removed. `kustomize build` for all three overlays
now renders a fully-resolved EC2NodeClass with no placeholders and no
stray ConfigMap.
Pre-existing bug, predating the agent-runtime program — surfaced by the
pre-deploy quality audit.
CI Results
All validations passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The base
karpenter-resourcesEC2NodeClass carries${CLUSTER_NAME}/${ENVIRONMENT}placeholders. Thedevoverlay patches them out with concrete values; staging and production never did — they defined akarpenter-configconfigMapGenerator that nothing consumed (noreplacements:block, no substitution plugin). So the rendered staging/production EC2NodeClass shipped literal${CLUSTER_NAME}in the IAMroleand the subnet / security-group tag selectors — Karpenter can't resolve an instance profile or match any subnet, so node provisioning fails — plus an orphankarpenter-configConfigMap intokube-system.Fix: staging and production now patch the EC2NodeClass with their concrete cluster name + environment, exactly as the
devoverlay does; the dead configMapGenerator is removed.Pre-existing bug (predates the agent-runtime program); surfaced by the pre-deploy quality audit.
Test plan
kustomize build— all three overlays render a fully-resolved EC2NodeClass (no${...}), no stray ConfigMaptask validate— yamllint + kustomize build all overlays, pass