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

chore: Add an Instancetype Controller to Asynchronously Hydrate InstanceType Data #6045

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

engedaam
Copy link
Contributor

@engedaam engedaam commented Apr 16, 2024

Fixes #N/A

Description

  • Asynchronously hydrate with instance type data. The controller will attempt to refresh the data every 12 hours, and implement a exponential backoff for delay: 1ms and max: 1000s

How was this change tested?

  • make presubmit
  • E2E testing will be added in a separate PR

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.

Copy link

netlify bot commented Apr 16, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 63ada74
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/662290ac7c4a8300083cc62b

@engedaam engedaam force-pushed the instancetype-controller branch 6 times, most recently from 656c7f4 to 13e8aed Compare April 17, 2024 00:50
@coveralls
Copy link

coveralls commented Apr 17, 2024

Pull Request Test Coverage Report for Build 8756167261

Details

  • 103 of 123 (83.74%) changed or added relevant lines in 5 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 81.963%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/providers/pricing/controller.go 0 1 0.0%
pkg/controllers/controllers.go 0 2 0.0%
pkg/providers/instancetype/instancetype.go 87 93 93.55%
pkg/controllers/providers/instancetype/controller.go 15 26 57.69%
Files with Coverage Reduction New Missed Lines %
pkg/providers/instancetype/instancetype.go 1 88.78%
Totals Coverage Status
Change from base Build 8756000678: -0.04%
Covered Lines: 5394
Relevant Lines: 6581

💛 - Coveralls

@engedaam engedaam marked this pull request as ready for review April 17, 2024 19:04
@engedaam engedaam requested a review from a team as a code owner April 17, 2024 19:04
@engedaam engedaam requested a review from tzneal April 17, 2024 19:04
@engedaam engedaam force-pushed the instancetype-controller branch 11 times, most recently from 5f20804 to 1159566 Compare April 18, 2024 01:56
pkg/controllers/providers/instancetype/controller.go Outdated Show resolved Hide resolved
pkg/controllers/controllers.go Show resolved Hide resolved
pkg/providers/instancetype/instancetype.go Outdated Show resolved Hide resolved
pkg/providers/instancetype/instancetype.go Outdated Show resolved Hide resolved
pkg/providers/instancetype/instancetype.go Outdated Show resolved Hide resolved
pkg/controllers/providers/instancetype/suite_test.go Outdated Show resolved Hide resolved
pkg/controllers/providers/instancetype/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/instancetype/instancetype.go Outdated Show resolved Hide resolved
@engedaam engedaam force-pushed the instancetype-controller branch 4 times, most recently from 49f1315 to 8b2025c Compare April 18, 2024 19:41
Copy link
Contributor Author

@engedaam engedaam 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-8b2025ce9871c7921210c9ce27099b020e38525a.
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-8b2025ce9871c7921210c9ce27099b020e38525a" --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

Copy link
Contributor

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

Nice work!

pkg/controllers/controllers.go Outdated Show resolved Hide resolved
pkg/controllers/providers/instancetype/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/instancetype/instancetype.go Show resolved Hide resolved
@engedaam engedaam force-pushed the instancetype-controller branch 3 times, most recently from 5426ae6 to d29bc12 Compare April 19, 2024 15:40
Copy link
Contributor

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

@engedaam engedaam merged commit f724f6e into aws:main Apr 20, 2024
17 checks passed
@engedaam engedaam deleted the instancetype-controller branch April 20, 2024 01:40
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