Skip to content

perf: Add Get() on InstanceType provider #8118

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

Merged
merged 2 commits into from
May 23, 2025

Conversation

jonathan-innis
Copy link
Contributor

@jonathan-innis jonathan-innis commented May 22, 2025

Fixes #N/A

Description

Improve performance on List() NodeClaims on the cloudprovider by not resolving all instance types every single iteration across the instance types.

How was this change tested?

make presubmit
/karpenter snapshot

Does this change impact docs?

  • 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.

@jonathan-innis jonathan-innis requested a review from a team as a code owner May 22, 2025 23:09
@jonathan-innis jonathan-innis requested a review from tzneal May 22, 2025 23:09
Copy link

netlify bot commented May 22, 2025

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit aa65967
🔍 Latest deploy log https://app.netlify.com/projects/karpenter-docs-prod/deploys/682ffd63023e9900084ed955

@jonathan-innis jonathan-innis force-pushed the add-instance-type-get branch 2 times, most recently from 9b16fa6 to 8bfa16b Compare May 22, 2025 23:12
@jonathan-innis jonathan-innis changed the title perf: Add Get on InstanceType provider perf: Add Get() on InstanceType provider May 22, 2025
@coveralls
Copy link

coveralls commented May 22, 2025

Pull Request Test Coverage Report for Build 15202516228

Details

  • 56 of 104 (53.85%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.2%) to 66.628%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/cloudprovider/cloudprovider.go 4 20 20.0%
pkg/providers/instancetype/instancetype.go 44 76 57.89%
Files with Coverage Reduction New Missed Lines %
pkg/providers/instance/instance.go 1 92.66%
pkg/providers/instancetype/instancetype.go 1 81.7%
Totals Coverage Status
Change from base Build 15198787956: -0.2%
Covered Lines: 6930
Relevant Lines: 10401

💛 - Coveralls

Copy link
Contributor Author

@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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-8bfa16bc0064516840c80a7ef00c3eb9845bb1b9.
To install you must login to the ECR repo with an AWS account:

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 021119463062.dkr.ecr.us-east-1.amazonaws.com

helm upgrade --install karpenter oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter --version "0-8bfa16bc0064516840c80a7ef00c3eb9845bb1b9" --namespace "kube-system" --create-namespace \
  --set "settings.clusterName=${CLUSTER_NAME}" \
  --set "settings.interruptionQueue=${CLUSTER_NAME}" \
  --set controller.resources.requests.cpu=1 \
  --set controller.resources.requests.memory=1Gi \
  --set controller.resources.limits.cpu=1 \
  --set controller.resources.limits.memory=1Gi \
  --wait

@jonathan-innis jonathan-innis force-pushed the add-instance-type-get branch from 8bfa16b to d9de17c Compare May 22, 2025 23:58
@jonathan-innis jonathan-innis enabled auto-merge (squash) May 23, 2025 00:11
@jonathan-innis jonathan-innis disabled auto-merge May 23, 2025 00:11
Copy link
Contributor Author

@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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-aa65967ff361bd715b5e0e0ee84a07814fb3edbb.
To install you must login to the ECR repo with an AWS account:

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 021119463062.dkr.ecr.us-east-1.amazonaws.com

helm upgrade --install karpenter oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter --version "0-aa65967ff361bd715b5e0e0ee84a07814fb3edbb" --namespace "kube-system" --create-namespace \
  --set "settings.clusterName=${CLUSTER_NAME}" \
  --set "settings.interruptionQueue=${CLUSTER_NAME}" \
  --set controller.resources.requests.cpu=1 \
  --set controller.resources.requests.memory=1Gi \
  --set controller.resources.limits.cpu=1 \
  --set controller.resources.limits.memory=1Gi \
  --wait

@jonathan-innis jonathan-innis enabled auto-merge (squash) May 23, 2025 17:02
Copy link
Contributor

@jmdeal jmdeal left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jonathan-innis jonathan-innis merged commit 216c17a into aws:main May 23, 2025
34 checks passed
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.

3 participants