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: Use AMI Status Controller to Asynchronously Hydrate AMI Data #6089

Merged
merged 6 commits into from
May 15, 2024

Conversation

engedaam
Copy link
Contributor

Fixes #N/A

Description

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

How was this change tested?

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 23, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 88e7414
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/6642489ca464bd000844eae7

@engedaam engedaam changed the title chore: Use AMI status Controller to Asynchronously Hydrate AMI Data chore: Use AMI Status Controller to Asynchronously Hydrate AMI Data Apr 23, 2024
@engedaam engedaam force-pushed the ami-controller branch 2 times, most recently from 8d1bd23 to 7ece28b Compare April 23, 2024 21:30
pkg/controllers/nodeclass/status/ami.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/ami.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/resolver.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/resolver.go Outdated Show resolved Hide resolved
@engedaam engedaam force-pushed the ami-controller branch 9 times, most recently from 6330757 to 5b2a3dc Compare April 25, 2024 21:43
@engedaam engedaam marked this pull request as ready for review April 25, 2024 21:43
@engedaam engedaam requested a review from a team as a code owner April 25, 2024 21:43
@engedaam engedaam requested a review from ellistarn April 25, 2024 21:43
@coveralls
Copy link

coveralls commented Apr 25, 2024

Pull Request Test Coverage Report for Build 9066950915

Details

  • 77 of 77 (100.0%) changed or added relevant lines in 7 files are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.2%) to 82.432%

Files with Coverage Reduction New Missed Lines %
pkg/cloudprovider/drift.go 1 93.26%
pkg/providers/amifamily/ami.go 2 90.45%
pkg/fake/ssmapi.go 2 84.62%
Totals Coverage Status
Change from base Build 9066586011: 0.2%
Covered Lines: 5485
Relevant Lines: 6654

💛 - Coveralls

pkg/providers/amifamily/ami.go Outdated Show resolved Hide resolved
pkg/providers/launchtemplate/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/ami.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/ami.go Outdated Show resolved Hide resolved
@engedaam engedaam force-pushed the ami-controller branch 6 times, most recently from 9a14f92 to 7895312 Compare April 25, 2024 22:55
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-7895312aa641f9e4fadf6de6e41541a0e3331e10.
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-7895312aa641f9e4fadf6de6e41541a0e3331e10" --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

pkg/providers/amifamily/ami.go Outdated Show resolved Hide resolved
pkg/providers/amifamily/resolver.go Show resolved Hide resolved
pkg/cloudprovider/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/instance/suite_test.go Outdated Show resolved Hide resolved
pkg/providers/instancetype/suite_test.go Outdated Show resolved Hide resolved
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.

LGTM just one comment.

pkg/controllers/nodeclass/status/ami_test.go Outdated Show resolved Hide resolved
njtran
njtran previously approved these changes May 13, 2024
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-88e741449be9d1e7c679828a829f565b4a29d7de.
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-88e741449be9d1e7c679828a829f565b4a29d7de" --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.

LGTM 🚀

@engedaam engedaam merged commit 856ec3f into aws:main May 15, 2024
27 of 29 checks passed
@engedaam engedaam deleted the ami-controller branch May 15, 2024 03:15
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.

5 participants