-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add instance-selector cmd to toolbox #9478
Add instance-selector cmd to toolbox #9478
Conversation
Hi @bwagner5. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
@bwagner5 Any reason why not using |
@hakman just an oversight, updated. |
Thanks @bwagner5. |
/assign @geojaz |
296eab3
to
308c5c7
Compare
308c5c7
to
8bc13bc
Compare
@hakman my bad, the commit message is just wrong. I'll update |
cca320e
to
832f9b3
Compare
I think there is still some weirdness in the vendor related commits. For example defaults.go: 832f9b3. Maybe squashing the the vendor and gomod commits into one would fix all this. |
832f9b3
to
98ba1d4
Compare
I don't think it worked. Still there are some commits reverting changes from previous ones. Probably would be best to restage them. |
5cced34
to
fa65aea
Compare
apologies on all the noise :) I rebased to clean up the PR into 2 nicer commits. Seems there was a transient failure in the 1 year cert issue test too. All tests passed locally, and passed after I reran the build on gh-actions. |
981dfc2
to
443ed67
Compare
Maybe I am doing something wrong, but it's not working for me anymore:
I am more a fan of the "16gb" notation instead of "16 GiB". |
443ed67
to
7e2cb54
Compare
@hakman Sorry, that was my bad... pushed a little too quickly before I went on vacation. It's fixed now:
I agree, I like the "4gb" syntax better as well. I've updated the CLI examples in the usage to reflect. 4 GiB will still be parsable. |
Thanks for the update @bwagner5. Will take another look tomorrow. Enjoy vacation 😄 ! |
df964c1
to
2d6d7ec
Compare
Hey @bwagner5, I finally go some time to finish the review. It looks very well, except a few nits/questions:
clusterAutoscalerDefault := false
nodeCountMinDefault := 2
nodeCountMaxDefault := 15 would change them to: clusterAutoscalerDefault := true
nodeCountMinDefault := 1
nodeCountMaxDefault := 10
$ kops toolbox instance-selector ondemand-ig --dry-run --cluster-autoscaler
Using cluster from kubectl context: instance-selector.test.com
apiVersion: kops.k8s.io/v1alpha2
kind: InstanceGroup
metadata:
creationTimestamp: null
labels:
kops.k8s.io/cluster: ""
name: ondemand-ig
spec:
cloudLabels:
=> k8s.io/cluster-autoscaler/: "1"
k8s.io/cluster-autoscaler/enabled: "1"
kops.k8s.io/instance-selector: "1" What do you think? |
Those defaults sound very reasonable, I've updated the PR. The cluster-autoscaler labels should be added properly with the label now (tested with --name and
|
Nice work. Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bwagner5, hakman The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue:
#8804
This PR adds
kops toolbox instance-selector
which is used to create kops instance groups based on resource criteria of AWS instance types. There are built in best-practices for generating heterogeneous spot autoscaling groups w/ capacity-optimized allocation strategy. The instance-selector can also generate on-demand instance-groups which are still heterogeneous but use a lowest-price allocation strategy.This command is implemented by utilizing the
github.com/aws/amazon-ec2-instance-selector
go pkg.Testing:
Cluster has already been created on AWS