Skip to content

feat: Add the Node Overlay CRD #2296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

engedaam
Copy link
Contributor

Fixes #N/A

Description
This PR introduces the NodeOverlay CRD, a new Karpenter API that enables fine-tuning of the scheduling simulation for advanced use cases.

Features

  • Implemented NodeOverlay CRD based on the Node Overlay RFC
    • requirements: Constrain when the NodeOverlay is applied
    • priceAdjustment: Modify the simulated price of matching nodes
    • capacity: Add extended resources to matching nodes
  • Added Common Expression Language (CEL) rules for CRD validation
  • Included unit tests to validate CEL rules

Example Usage

apiVersion: karpenter.sh/v1alpha1
kind: NodeOverlay
metadata:
  name: adjustment
spec:
  requirements:
    - key: karpenter.sh/capacity-type
      operator: In
      values: ["spot"]
  priceAdjustment: "0.109"
  capacity:
     smarter-devices/fuse: 1

How was this change tested?

  • make presubmit

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: engedaam
Once this PR has been reviewed and has the lgtm label, please assign tzneal for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 10, 2025
@k8s-ci-robot k8s-ci-robot requested review from njtran and tallaxes June 10, 2025 22:21
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 10, 2025
@coveralls
Copy link

coveralls commented Jun 10, 2025

Pull Request Test Coverage Report for Build 15624727004

Details

  • 86 of 197 (43.65%) changed or added relevant lines in 7 files are covered.
  • 11 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.6%) to 81.33%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/apis/v1alpha1/nodeoverlay.go 0 9 0.0%
pkg/apis/v1alpha1/nodeoverlay_status.go 0 11 0.0%
pkg/apis/v1alpha1/nodeoverlay_validation.go 51 68 75.0%
pkg/test/nodeoverlay.go 0 17 0.0%
pkg/apis/v1alpha1/zz_generated.deepcopy.go 25 82 30.49%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/provisioning/scheduling/topologydomaingroup.go 4 86.21%
pkg/controllers/provisioning/scheduling/preferences.go 7 88.76%
Totals Coverage Status
Change from base Build 15622093258: -0.6%
Covered Lines: 10324
Relevant Lines: 12694

💛 - Coveralls

@engedaam engedaam force-pushed the add-node-overlay-crds branch from 7981957 to 8c13443 Compare June 11, 2025 19:59
@engedaam engedaam force-pushed the add-node-overlay-crds branch 3 times, most recently from 1fa8e1a to 17cf6cf Compare June 12, 2025 18:28
@engedaam engedaam force-pushed the add-node-overlay-crds branch 2 times, most recently from 9615254 to b01dab5 Compare June 13, 2025 02:00
@engedaam engedaam force-pushed the add-node-overlay-crds branch from b01dab5 to d604841 Compare June 13, 2025 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants