AUTOSCALE-166: feat(karpenter): deploy NodeOverlay CRD to guest cluster - #9262
AUTOSCALE-166: feat(karpenter): deploy NodeOverlay CRD to guest cluster#9262fishereskew wants to merge 1 commit into
Conversation
Signed-off-by: Fisher Eskew <feskew@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
|
@fishereskew: This pull request references AUTOSCALE-166 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
📝 WalkthroughWalkthroughThe Karpenter controller now manages the Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fishereskew The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
karpenter-operator/controllers/karpenter/karpenter_controller.go (1)
100-101: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAdd deterministic coverage for the
nodeoverlays.karpenter.shCRD watch.The
*TestReconcileCRDsConcurrentAccesscase validates global CRD spec concurrency, but no test checks that anodeoverlays.karpenter.shevent enqueues the expected controller request. Add coverage for this new case, or usecrdNodeOverlay.Namein thecaseso the watch filter cannot drift from the loaded manifest.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@karpenter-operator/controllers/karpenter/karpenter_controller.go` around lines 100 - 101, Add deterministic coverage to TestReconcileCRDsConcurrentAccess confirming that a nodeoverlays.karpenter.sh event enqueues the expected controller request, or replace the literal watch case with crdNodeOverlay.Name so it remains aligned with the loaded manifest. Keep existing CRD watch behavior unchanged.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@karpenter-operator/controllers/karpenter/karpenter_controller.go`:
- Around line 100-101: Add deterministic coverage to
TestReconcileCRDsConcurrentAccess confirming that a nodeoverlays.karpenter.sh
event enqueues the expected controller request, or replace the literal watch
case with crdNodeOverlay.Name so it remains aligned with the loaded manifest.
Keep existing CRD watch behavior unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: c2c639ce-a8ce-4a47-81ed-7aeeced93b55
📒 Files selected for processing (2)
karpenter-operator/controllers/karpenter/karpenter_controller.gokarpenter-operator/controllers/karpenter/karpenter_controller_test.go
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9262 +/- ##
=======================================
Coverage 45.02% 45.02%
=======================================
Files 778 778
Lines 97539 97540 +1
=======================================
+ Hits 43918 43919 +1
Misses 50592 50592
Partials 3029 3029
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/area karpenter-operator |
What this PR does / why we need it:
Adds the NodeOverlay CRD (karpenter.sh_nodeoverlays.yaml) to the hypershift karpenter controller so it gets deployed to guest clusters alongside EC2NodeClass, NodePool, and NodeClaim.
The upstream karpenter core regression e2e tests expect the NodeOverlay CRD to exist in the cluster. Without this, tests fail with no matches for kind "NodeOverlay".
Which issue(s) this PR fixes:
A part of AUTOSCALE-166
Special notes for your reviewer:
The standalone karpenter-operator repo already has NodeOverlay wired up via CoreCRDs in pkg/assets/assets.go.
Checklist:
Summary by CodeRabbit
New Features
Tests