Skip to content

Proposal for karpenter intergation #439

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlory
Copy link
Member

@carlory carlory commented Jun 4, 2025

What this PR does / why we need it

Support scaling with Spot instances for cost saving with Karpenter

Which issue(s) this PR fixes

xref #106

Special notes for your reviewer

Does this PR introduce a user-facing change?

NONE

@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Jun 4, 2025
@InftyAI-Agent InftyAI-Agent requested review from kerthcet June 4, 2025 09:57
@kerthcet
Copy link
Member

kerthcet commented Jun 4, 2025

Is this ready for review @carlory

@carlory
Copy link
Member Author

carlory commented Jun 4, 2025

Is this ready for review @carlory

No. it needs to add more information. once it is ready, I will drop the WIP from PR's title and ping you again.

@carlory carlory changed the title [WIP] Proposal for karpenter intergation Proposal for karpenter intergation Jun 5, 2025
@kerthcet
Copy link
Member

kerthcet commented Jun 5, 2025

cc @jwcesign would you like to take a look as well? Would like to have more inputs from the karpenter side. Thanks.

Comment on lines +279 to +295
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: karpenter.k8s.aws/instance-gpu-name
operator: In
values: ["t4g"]
- matchExpressions:
- key: karpenter.k8s.aws/instance-gpu-name
operator: In
values: ["t4"]
Copy link
Contributor

@cr7258 cr7258 Jun 5, 2025

Choose a reason for hiding this comment

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

In the user stories, it mentions:

Instead of locking my manifests to a single GPU type, I want to express a preference-ordered list of compatible GPU types (e.g., prefer A100, fall back to A10 or L4).

How can we control the preference order of multiple GPU types? We cannot control the order within nodeSelectorTerms, both t4g and t4 nodes are eligible to be selected.

Copy link
Member

Choose a reason for hiding this comment

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

Please add the differences with karpenter's nodeSelectorTerms, if we have links that would be great.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a link to explain it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why does this work for llmaz's resource fungibility? Please refer to the Karpenter Scheduling for more details.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for your explanation.

@jwcesign
Copy link

jwcesign commented Jun 5, 2025

I will take a look this weekend.
Thanks for notification. @kerthcet

Copy link
Member

@kerthcet kerthcet left a comment

Choose a reason for hiding this comment

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

Thanks @carlory This is exciting to me!

Comment on lines +279 to +295
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: karpenter.k8s.aws/instance-gpu-name
operator: In
values: ["t4g"]
- matchExpressions:
- key: karpenter.k8s.aws/instance-gpu-name
operator: In
values: ["t4"]
Copy link
Member

Choose a reason for hiding this comment

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

Please add the differences with karpenter's nodeSelectorTerms, if we have links that would be great.

What other approaches did you consider, and why did you rule them out? These do
not need to be as detailed as the proposal, but should include enough
information to express the idea and why it was not acceptable.
-->
Copy link
Member

Choose a reason for hiding this comment

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

Could you also provide a comparison about multiple nodepools implementation?

Copy link
Member Author

Choose a reason for hiding this comment

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

will add later

@carlory
Copy link
Member Author

carlory commented Jun 6, 2025

FYI: InftyAI/karpenter#2

Copy link
Member

@kerthcet kerthcet left a comment

Choose a reason for hiding this comment

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

Let's have a workflow to explain how karpenter + llmaz works together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/needs-kind Indicates a PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants