Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Enable spot instances #528

Merged
merged 18 commits into from
Apr 23, 2020
Merged

Enable spot instances #528

merged 18 commits into from
Apr 23, 2020

Conversation

teemow
Copy link
Member

@teemow teemow commented Mar 26, 2020

  • add new flags to gsctl create nodepool
    • --aws-on-demand-base-capacity: Number of on-demand instances that this node pool needs to have until spot instances are used. Default is 0
    • --aws-spot-instance-percentage-above-base-capacity: Percentage of spot instances used once the on-demand base capacity is fullfilled. A number of 40 would mean that 60% will be on-demand and 40% will be spot instances.
    • --aws-use-alike-instance-types: Use similar instance type in your node pool. This list is maintained by Giant Swarm at the moment. Eg if you select m5.xlarge then the node pool can fall back on m4.xlarge too.
  • show these options in gsctl show nodepool and gsctl list nodepools too.

@teemow teemow self-assigned this Mar 26, 2020
@coveralls
Copy link

coveralls commented Mar 26, 2020

Coverage Status

Coverage increased (+0.07%) to 46.378% when pulling 8bdc4c7 on add-spot-instances into 4bae2a4 on master.

@marians
Copy link
Member

marians commented Mar 26, 2020

@teemow In the main comment you say this PR is adding a flag --enable-spot-instances, but in the code that's not happing. What's the plan?

Having a boolean switch to simply turn on the usage of spot instances would be completely in line with what we always did. The backend (where ever that is) should handle the rest based on sensible defaults if the user doesn't specify the rest.

@marians
Copy link
Member

marians commented Mar 27, 2020

@marians
Copy link
Member

marians commented Mar 27, 2020

Could --aws-spot-instance-percentage-above-base-capacity be made a little shorter?

I think the instance part could be left out without harm, it's also not present in --aws-on-demand-base-capacity.

The above-base-capacity might also be too verbose. Assuming users will read the usage text for the explanation anyway.

It's a balance.

Here are my suggestions:

  • --aws-spot-percentage-above-base
  • --aws-spot-percentage

@marians marians requested a review from a team April 23, 2020 13:05
go.mod Outdated Show resolved Hide resolved
@marians marians merged commit b3f9133 into master Apr 23, 2020
@marians marians deleted the add-spot-instances branch April 23, 2020 14:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants