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: Convert all AWS providers to interfaces #6001

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

jonathan-innis
Copy link
Contributor

Fixes #N/A

Description

This change adds interfaces for all of the provider clients to allow for mocking of the Providers to ease some of the testing burden for mocking out the underlying data.

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 April 8, 2024 23:12
@jonathan-innis jonathan-innis requested a review from njtran April 8, 2024 23:12
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

netlify bot commented Apr 8, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit da51b1d
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/66147a2d3994f70008e0b004

Copy link
Contributor

github-actions bot commented Apr 8, 2024

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-c0cd24f7b7abfb4a48172e2e186c6469c86744d2.
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-c0cd24f7b7abfb4a48172e2e186c6469c86744d2" --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

@coveralls
Copy link

coveralls commented Apr 8, 2024

Pull Request Test Coverage Report for Build 8607811494

Details

  • 93 of 107 (86.92%) changed or added relevant lines in 20 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 82.261%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/controllers.go 0 1 0.0%
pkg/providers/instancetype/instancetype.go 6 7 85.71%
pkg/providers/launchtemplate/launchtemplate.go 13 14 92.86%
pkg/providers/pricing/pricing.go 11 12 91.67%
pkg/providers/sqs/sqs.go 5 6 83.33%
pkg/providers/subnet/subnet.go 6 7 85.71%
pkg/operator/operator.go 0 8 0.0%
Totals Coverage Status
Change from base Build 8603714153: 0.02%
Covered Lines: 5333
Relevant Lines: 6483

💛 - Coveralls

@jonathan-innis jonathan-innis enabled auto-merge (squash) April 8, 2024 23:38
Copy link
Contributor

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

LGTM 🚀

@jonathan-innis jonathan-innis merged commit af43cf8 into aws:main Apr 8, 2024
16 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