Skip to content
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

feat: create constraints on offerings #1262

Merged

Conversation

rschalo
Copy link
Contributor

@rschalo rschalo commented May 16, 2024

Fixes
aws/karpenter-provider-aws#3878
aws/karpenter-provider-aws#4612

Description
This change allows cloudprovider specific constraints to be added to Offering. Zone and capacityType are special labels that are used across the Karpenter codebase.

How was this change tested?
There shouldn't be the need for new tests as long as the current test suite passes. There will be additional tests required in karpenter-aws-provider in order to validate additional constraints. Starting this draft PR for discussion.

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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 16, 2024
@k8s-ci-robot k8s-ci-robot requested review from engedaam and tallaxes May 16, 2024 21:19
Copy link

linux-foundation-easycla bot commented May 16, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label May 16, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @rschalo!

It looks like this is your first PR to kubernetes-sigs/karpenter 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/karpenter has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @rschalo. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 16, 2024
@rschalo rschalo force-pushed the generalize-offering-requirements branch 2 times, most recently from 7687440 to e6beb93 Compare May 16, 2024 22:02
@coveralls
Copy link

coveralls commented May 16, 2024

Pull Request Test Coverage Report for Build 9212879269

Details

  • 53 of 68 (77.94%) changed or added relevant lines in 10 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 77.94%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kwok/cloudprovider/cloudprovider.go 0 3 0.0%
kwok/cloudprovider/helpers.go 0 6 0.0%
kwok/tools/gen_instance_types.go 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/disruption/expiration.go 2 89.66%
Totals Coverage Status
Change from base Build 9201236655: 0.04%
Covered Lines: 8271
Relevant Lines: 10612

💛 - Coveralls

pkg/cloudprovider/types.go Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
@rschalo rschalo force-pushed the generalize-offering-requirements branch 4 times, most recently from 080ade8 to acb7442 Compare May 20, 2024 16:01
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Show resolved Hide resolved
pkg/test/helpers.go Outdated Show resolved Hide resolved
pkg/controllers/provisioning/scheduling/nodeclaim.go Outdated Show resolved Hide resolved
pkg/controllers/disruption/helpers.go Outdated Show resolved Hide resolved
@rschalo rschalo force-pushed the generalize-offering-requirements branch from acb7442 to 372e95c Compare May 21, 2024 20:54
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 21, 2024
kwok/cloudprovider/cloudprovider.go Outdated Show resolved Hide resolved
kwok/cloudprovider/helpers.go Outdated Show resolved Hide resolved
kwok/cloudprovider/helpers.go Outdated Show resolved Hide resolved
pkg/cloudprovider/fake/cloudprovider.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/controllers/provisioning/scheduling/suite_test.go Outdated Show resolved Hide resolved
pkg/controllers/provisioning/scheduling/suite_test.go Outdated Show resolved Hide resolved
pkg/controllers/provisioning/scheduling/suite_test.go Outdated Show resolved Hide resolved
@rschalo rschalo force-pushed the generalize-offering-requirements branch from 372e95c to e18fc22 Compare May 21, 2024 22:35
@jmdeal
Copy link
Member

jmdeal commented May 21, 2024

/assign @jmdeal

@rschalo rschalo force-pushed the generalize-offering-requirements branch from e18fc22 to e29ecad Compare May 21, 2024 22:43
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/controllers/provisioning/scheduling/nodeclaim.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Show resolved Hide resolved
pkg/cloudprovider/types.go Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/cloudprovider/types.go Show resolved Hide resolved
pkg/cloudprovider/types.go Outdated Show resolved Hide resolved
pkg/controllers/provisioning/scheduling/nodeclaim.go Outdated Show resolved Hide resolved
@rschalo rschalo force-pushed the generalize-offering-requirements branch from 957333a to 03c669c Compare May 22, 2024 17:56
@rschalo rschalo marked this pull request as ready for review May 22, 2024 19:21
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 22, 2024
@k8s-ci-robot k8s-ci-robot requested a review from jackfrancis May 22, 2024 19:21
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, otherwise lgtm

@rschalo rschalo force-pushed the generalize-offering-requirements branch from 25439a5 to de6cbd1 Compare May 23, 2024 03:48
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 23, 2024
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 23, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2024
Copy link
Contributor

@njtran njtran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonathan-innis, njtran, rschalo

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [jonathan-innis,njtran]

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 removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 23, 2024
@jmdeal
Copy link
Member

jmdeal commented May 24, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 24, 2024
@k8s-ci-robot k8s-ci-robot merged commit a30f67a into kubernetes-sigs:main May 24, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants