-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Request AWS ASGs in batches #6056
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
Hi @KierranM. 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 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. |
I have signed the CLA now :) |
/check-cla |
1 similar comment
/check-cla |
@KierranM Can you make sure you made the commit with the same email address that you used to sign the CLA? Luckily once you get this setup, you're good for all Kubernetes projects 😄 Thanks! |
2c3bd2f
to
7150ca1
Compare
/check-cla |
I've updated the email in my CLA profile, and I've confirmed I have my Github identity in the Social Networks part of the CLA site. I originally joined up as an employee with my work email but that's not tied to my Github account |
Signed-off-by: Kierran McPherson <kierran.mcpherson@xero.com>
7150ca1
to
0be767a
Compare
The check checks against the email that the git commit added as metadata - so what you configured with git config - not what’s here on github. Can you check this? |
/check-cla |
if asg.Status != nil { | ||
glog.Warningf("Skipping ASG %v (which matches tags): %v", *asg.AutoScalingGroupARN, *asg.Status) | ||
continue | ||
for i := 0; i < len(asgNames); i += 50 { |
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.
nit: might be good to pull out the 50
as a variable or a constant; it would make it easier to change in future and also let us put a comment like 'DescribeAutoScalingGroups is limited to 50 names at a time`. But just a nit :-)
I also thought there was a function to do this batching in the go stdlib, but I can't find it at the moment.
That's a lot of ASGs :-) Thanks @KierranM /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb, KierranM 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 |
fixes #6045
Breaks up DescribeAutoScalingGroups API calls into batches of 50 as the input can't handle more than that.
Prior to this change running a command like
kops delete ig <ig name> --yes -v 10
against a cluster with more than 50 tagged ASGs would result in:With the changes made it chunks up the found ASGs into batches of 50 and calls it repeatedly: