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: add cpu sustained clock speed label to instance metadata #7043

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

Conversation

aidan-canva
Copy link

Description
Some workloads are sensitive to variations instance CPU clock speed - either preferring a specific threshold or at least ensuring consistency across replicas. This PR adds the EC2 SustainedClockSpeedInGhz value as a Karpenter label (karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz) so that workloads can add their preference.

The upstream value from the EC2 API is in Ghz and represented as a float (ie 2.4). nodeSelectors only support ints or strings and most use-cases for this will want to leverage the Gt or Lt operators to set minimum/maximum values. To make this usable, this implementation converts the Ghz value into Mhz and represents it as an int.

How was this change tested?

  • make test
  • Local deployment / manual testing

Does this change impact docs?
Do codegen docs count? website/content/en/preview/reference/instance-types.md has been updated to reflect this new instance attribute.

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

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

@aidan-canva aidan-canva requested a review from a team as a code owner September 19, 2024 22:34
Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for karpenter-docs-prod ready!

Name Link
🔨 Latest commit 64abfc1
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/671f33549028310008e8a65d
😎 Deploy Preview https://deploy-preview-7043--karpenter-docs-prod.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rschalo
Copy link
Contributor

rschalo commented Sep 23, 2024

Thanks for your contribution! Running the test workflows.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10949927017

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

  • 5 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 83.023%

Totals Coverage Status
Change from base Build 10910984774: 0.03%
Covered Lines: 5526
Relevant Lines: 6656

💛 - Coveralls

@njtran
Copy link
Contributor

njtran commented Sep 30, 2024

@aidan-canva are you able to fix the CI errors?

Copy link
Contributor

This PR has been inactive for 14 days. StaleBot will close this stale PR after 14 more days of inactivity.

@aidan-canva
Copy link
Author

@njtran apologies for the delay, I've been on vacation for a period. I've just pushed a fix which should hopefully address the CI failures. Can I kick checks off myself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants