-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Added check to filter supported nodes by ami's arch type #7933
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: gnana997 <[email protected]>
✅ Deploy Preview for karpenter-docs-prod ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
325bc21
to
e989255
Compare
Signed-off-by: gnana997 <[email protected]>
e989255
to
a7cad45
Compare
for _, ami := range amis { | ||
if err := instanceType.Requirements.Compatible( | ||
scheduling.NewNodeSelectorRequirements(ami.Requirements...), | ||
scheduling.AllowUndefinedWellKnownLabels, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we allow our Unknown WellKnown labels to be compatible here? Can we check the other places we are doing instance type compatibility with AMIs?
Also, I wonder if we can just re-leverage MapInstanceTypes
and then just pull-out the instance types that we support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnana997 Any luck with this update?
// Filter instance types that don't have compatible AMIs to prevent architecture mismatches | ||
filteredInstanceTypes := amifamily.FilterInstanceTypesByAMICompatibility(instanceTypesWithOfferings, nodeClass.Status.AMIs) | ||
if len(filteredInstanceTypes) == 0 { | ||
log.FromContext(ctx).WithValues( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a log -- this is an error IMO
Fixes #7893
Description
Added a check to filter the nodes from the node pool based on the required architecture for the provided AMI in the Node Class
How was this change tested?
Working on adding test cases to check the added filtering check.
Does this change impact docs?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.