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

feat: drift instance types that no longer exist #7223

Closed
wants to merge 1 commit into from

Conversation

njtran
Copy link
Contributor

@njtran njtran commented Oct 15, 2024

Fixes #N/A

Description
Makes sure that an instance type that no longer is returned in ec2 describe instance types, but may have an existing node with that instance type can still drift. Previously this would just error, resulting in users having to delete the instances themselves.

How was this change tested?
make presubmit

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.

@njtran njtran requested a review from a team as a code owner October 15, 2024 18:43
@njtran njtran requested a review from bwagner5 October 15, 2024 18:43
Copy link

netlify bot commented Oct 15, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit bb126cf
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/670eb7e9b61cc80008dac866

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11352410002

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 83.084%

Files with Coverage Reduction New Missed Lines %
pkg/providers/instancetype/instancetype.go 5 95.63%
Totals Coverage Status
Change from base Build 11352206782: 0.01%
Covered Lines: 5599
Relevant Lines: 6739

💛 - Coveralls

if !found {
return "", fmt.Errorf(`finding node instance type "%s"`, nodeClaim.Labels[corev1.LabelInstanceTypeStable])
log.FromContext(ctx).V(1).Info(fmt.Sprintf("failed to find node instance type %q, continuing to drift", nodeClaim.Labels[corev1.LabelInstanceTypeStable]))
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like it might be generally applicable to all providers. Why just have this in the AWS provider?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I imagine that different providers might have different ways to reason about instance type deprecations. I wouldn't want to be overhanded and assume we know how it should work for everyone

@njtran
Copy link
Contributor Author

njtran commented Oct 21, 2024

closing in favor of refactoring this generally into the upstream package

@njtran njtran closed this Oct 21, 2024
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