OCPBUGS-126680: fix: approve CSRs of nodes in VPCs with a custom DHCP domain #62
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 211 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.320
Real PR Conversation Timeline
1 comments
"Review active on #62"
general
weight: 0.35
linkvt
TODO
/jira backport release-5.0,release-4.22here if the approach is acceptedRelated hypershift PR with E2E test: https://github.com/openshift/hypershift/pull/10004
The related PR also contains a verbose description, the following is just the commit message.
The implementation here is almost equal to the approach form the PR linked above.
Summary
The node identity verifier only accepted a node name that equals the EC2 PrivateDnsName of a pending NodeClaim instance. If the VPC's DHCP option set has a custom domain-name, the kubelet node name is the first label of the PrivateDnsName followed by that domain, so the client and serving CSRs of Karpenter nodes were never approved and the nodes never registered.
Match the node name against the PrivateDnsName first, as before. Only if no instance matches, look up the DHCP domain-name of the instance's VPC and also accept
<first label of the PrivateDnsName>.<first domain>, compared case-insensitively and ignoring a trailing dot. Nodes in VPCs with the default domain never depend on the lookup, and a match in an earlyDescribeInstancesbatch still returns without describing later batches. If the role lacks the permissions for the lookup, the CSR is not approved and the error is logged, as retrying does not help until they are granted. Other lookup errors are returned so the CSR is retried instead of silently staying pending. A mismatch against the pending instances is logged with their DHCP domains.The lookup needs
ec2:DescribeVpcsandec2:DescribeDhcpOptionson the Karpenter role. The AWS-managedROSAKarpenterControllerPolicyhasDescribeVpcsbut notDescribeDhcpOptions.