Skip to content

fix: pod errors when nodepool requirements filter all instance types #2341

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 5 commits into
base: main
Choose a base branch
from

Conversation

rschalo
Copy link
Contributor

@rschalo rschalo commented Jul 1, 2025

Fixes #N/A

Description
When NodeClaimTemplates are generated for the scheduling code, if NodePool requirements filter out all instance types then zero NodeClaimTemplates will be used for the parallelizeUntil call in the scheduler code. It's still important for Karpenter to ack the pods if the pods can schedule to existing or in-flight capacity, so after those checks if zero NodeClaimTemplates exist, a default error is sent back for the pod via podErrors.

How was this change tested?
Expanded unit testing and 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 k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 1, 2025
@k8s-ci-robot k8s-ci-robot requested review from engedaam and tallaxes July 1, 2025 04:35
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rschalo
Once this PR has been reviewed and has the lgtm label, please assign ellistarn 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 1, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16059149055

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 2 files are covered.
  • 32 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.002%) to 81.876%

Files with Coverage Reduction New Missed Lines %
pkg/test/cachesyncingclient.go 2 84.38%
pkg/controllers/node/termination/controller.go 3 77.37%
pkg/controllers/provisioning/scheduling/nodeclaim.go 3 89.66%
pkg/controllers/disruption/queue.go 24 77.83%
Totals Coverage Status
Change from base Build 15989448170: 0.002%
Covered Lines: 10219
Relevant Lines: 12481

💛 - Coveralls

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants