Skip to content

refactor: instance profile provider #7971

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 1 commit into from
Apr 9, 2025
Merged

Conversation

jmdeal
Copy link
Contributor

@jmdeal jmdeal commented Apr 4, 2025

Fixes #N/A

Description

Refactors the instance profile provider to introduce a Get method and take the instance profile name, role name, and tags directly in create / delete.

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.

@jmdeal jmdeal requested a review from a team as a code owner April 4, 2025 04:37
@jmdeal jmdeal requested a review from rschalo April 4, 2025 04:37
Copy link
Contributor Author

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

/karpenter snapshot

Copy link

netlify bot commented Apr 4, 2025

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit f17f44b
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/67ef61f036047500086d939b

Copy link
Contributor

github-actions bot commented Apr 4, 2025

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

Pull Request Test Coverage Report for Build 14258112541

Details

  • 60 of 69 (86.96%) changed or added relevant lines in 11 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 66.44%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/controllers.go 0 1 0.0%
pkg/operator/operator.go 0 1 0.0%
test/pkg/environment/aws/expectations.go 0 1 0.0%
pkg/providers/instanceprofile/instanceprofile.go 31 37 83.78%
Files with Coverage Reduction New Missed Lines %
pkg/test/nodeclass.go 3 95.92%
Totals Coverage Status
Change from base Build 14254795602: 0.04%
Covered Lines: 6745
Relevant Lines: 10152

💛 - Coveralls

Copy link
Contributor

@edibble21 edibble21 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jmdeal jmdeal merged commit a31b4db into aws:main Apr 9, 2025
35 of 38 checks passed
edibble21 pushed a commit to edibble21/karpenter-provider-aws that referenced this pull request Apr 9, 2025
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