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

fix issue regarding not pre-filtering instance types by provider constraints #1543

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

tzneal
Copy link
Contributor

@tzneal tzneal commented Mar 18, 2022

1. Issue, if available:

Fixes #1540

2. Description of changes:

Pre-filter the available instance types by the provider constraints

3. How was this change tested?

4. Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: link to issue
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@netlify
Copy link

netlify bot commented Mar 18, 2022

✅ Deploy Preview for karpenter-docs-prod canceled.

🔨 Explore the source changes: ea8084b

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/6234fa4b198e730008ad7114

@tzneal tzneal force-pushed the fix-prefilter-of-instance-types branch from e05e571 to 4da1f70 Compare March 18, 2022 21:00
@@ -109,6 +109,8 @@ func (c *CloudProvider) GetInstanceTypes(_ context.Context, _ *v1alpha5.Provider
NewInstanceType(InstanceTypeOptions{
Name: "arm-instance-type",
Architecture: "arm64",
CPU: resource.MustParse("16"),
Copy link
Contributor

Choose a reason for hiding this comment

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

I am curious why do we need to specify the CPU and memory here?

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 can only verify what it gets scheduled to, so I bumped the cpu/memory up and set a corresponding request in the pod to force it to either fit this instance or not be scheduled. Now with the filtering, it ends up not scheduled.

@tzneal tzneal force-pushed the fix-prefilter-of-instance-types branch from 4da1f70 to ea8084b Compare March 18, 2022 21:31
Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

lgtm

@tzneal tzneal merged commit c9e015e into aws:main Mar 18, 2022
@tzneal tzneal deleted the fix-prefilter-of-instance-types branch June 13, 2022 14:36
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.

Provisioner is creating some arm64 nodes even with kubernetes.io/arch in ["amd64"] requirement
3 participants