-
Notifications
You must be signed in to change notification settings - Fork 990
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: Adding capacityType discount as a percentage #4697
Closed
+210
−3
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,55 @@ | ||||||
# Discounted Pricing Support | ||||||
|
||||||
## Overview | ||||||
|
||||||
Karpenter is currently unaware of any discounted pricing, such as volume discounts or reserved instances/savings plans, which can lead to more expensive instances being chosen. For example an on demand instance with a savings plan discount may cost less than a spot instance of the same type. This pricing is apparently only available from the "payer" account, not any other child account API's for pricing. | ||||||
|
||||||
This was made explicit recently - the price of spot instances rose sharply at the beginning of Q2 2023. For users on default pricing this may not be noticeable, however if there is any discount for on-demand instances in an account, it could begin to become cheaper to use on-demand instances instead of spot. | ||||||
|
||||||
## User Stories | ||||||
|
||||||
* Karpenter will automatically prioritise the cheapest node capacity type in an account based on personal modifications to EC2 pricing | ||||||
* Karpenter will allow me to configure discounted pricing at the account level | ||||||
|
||||||
## Background | ||||||
|
||||||
[Conversation on Slack](https://kubernetes.slack.com/archives/C02SFFZSA2K/p1684246928553159) | ||||||
|
||||||
## How Will Karpenter Handle Discounted Pricing | ||||||
|
||||||
A multiplier will be applied to the price to allow any discounts to be applied and determine the real cost of an EC2 instance. | ||||||
For example, a multiplier of 0.9 would apply a 10% discount | ||||||
|
||||||
Separate multiplier values for Spot and On Demand pricing will be allowed to allow for accounts which have different pricing discounts for each type. | ||||||
|
||||||
The multiplier will default to a value of 1 so no discount will be applied unless explicitly enabled. | ||||||
|
||||||
### Spot pricing | ||||||
|
||||||
The Spot price will be multiplied with the SpotPriceMultiplier to determine the real cost for Spot instances. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```yaml | ||||||
apiVersion: v1 | ||||||
kind: ConfigMap | ||||||
metadata: | ||||||
name: karpenter-global-settings | ||||||
namespace: karpenter | ||||||
data: | ||||||
# Spot Price Multiplier for including volume discounts etc. for spot prices. The spot price will be multiplied with the spotPriceMultiplier to determine the real cost | ||||||
aws.spotPriceMultiplier: "0.95" | ||||||
``` | ||||||
|
||||||
### On Demand pricing | ||||||
|
||||||
The On Demand price will be multiplied with the OnDemandPriceMultiplier to determine the real cost for On Demand instances. | ||||||
|
||||||
```yaml | ||||||
apiVersion: v1 | ||||||
kind: ConfigMap | ||||||
metadata: | ||||||
name: karpenter-global-settings | ||||||
namespace: karpenter | ||||||
data: | ||||||
# On Demand Multiplier for including volume discounts etc. to ensure choosing the cheapest available instance. The ondemand price will be multiplied with the onDemandPriceMultiplier to determine the real cost | ||||||
aws.onDemandPriceMultiplier: "0.60" | ||||||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💭 could Karpenter learn to assume an IAM role into the AWS account where discounts are visible?
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.
If something like that was implemented it could resolve the issue of up-to-date govcloud pricing in AWS as well, as it could assume an IAM role in the commercial account
#2706 (comment)