Skip to content
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: enable min/max on Azure VMSS autodiscovery #2121

Merged
merged 4 commits into from
Oct 27, 2019

Conversation

alexeldeib
Copy link
Member

ref: #2051

@k8s-ci-robot
Copy link
Contributor

Welcome @alexeldeib!

It looks like this is your first PR to kubernetes/autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 12, 2019
@k8s-ci-robot k8s-ci-robot requested review from feiskyer and Jeffwan June 12, 2019 08:47
@alexeldeib
Copy link
Member Author

fyi @feiskyer

Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

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

Thanks for the fix.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2019
@alexeldeib
Copy link
Member Author

Want to remember to add a note to docs as well, I’ll do it this week. Until then

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2019
@mwielgus
Copy link
Contributor

What is the status of this PR? Can we merge it?

@feiskyer
Copy link
Member

ping @alexeldeib

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 24, 2019
@alexeldeib
Copy link
Member Author

Apologies, I did not remember 😦 that was the only missing piece.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 24, 2019
Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 25, 2019
@feiskyer
Copy link
Member

@mwielgus could you help to approve the changes?

@feiskyer
Copy link
Member

/assign @mwielgus

@feiskyer
Copy link
Member

@losipiuk Could you help to take a look?

@losipiuk
Copy link
Contributor

Seems fine. Just one request. Can we move all the ParseLabel stuff to be under cloudprovider/azure?

@feiskyer
Copy link
Member

Can we move all the ParseLabel stuff to be under cloudprovider/azure?

Reasonable. @alexeldeib could you move those to azure package?

@alexeldeib
Copy link
Member Author

Will do, but probably not before the end of the week.

@feiskyer
Copy link
Member

feiskyer commented Oct 2, 2019

ping @alexeldeib any updates on the PR?

@alexeldeib
Copy link
Member Author

Sorry for two extremely long delays.

@losipiuk I thought I understand the request -- basically move parseLabelAutoDiscoverySpec under cloudprovider/azure. But now that I'm looking more closely, this would be a bit larger change?

Few cloud providers define a private parse{MIG,ASG,Label}AutoDiscoverySpec functions in node_group_discovery_options.go, which is only used by the public type/func NodeGroupDiscoveryOptions.Parse{MIG,ASG,Label}..., but they share NodeGroupDiscoveryOptions.

Do you want me to break this up and move the cloudprovider-specific bits into their respective directories for GCE, AWS, as well as Azure provider? It seems like that would be necessary, based on the current structure (otherwise I'm introducing a circular import dependency from {specific provider} -> {discovery opts} -> {specific provider} ).

I can definitely do it, but I didn't want to make any code changes to other providers without checking this.

@alexeldeib
Copy link
Member Author

@feiskyer maybe you can give me a sanity check on that, if I am missing something obvious here?

@losipiuk
Copy link
Contributor

@alexeldeib sorry for the late response. I was thinking of moving both parseLabelAutoDiscoverySpec and NodeGroupDiscoveryOptions.ParseLabelAutoDiscoverySpecs to cloudprovider/azure. The latter would become just a private method parseLabelAutoDiscoverySpecs which would use data from public NodeGroupDiscoveryOptions.NodeGroupAutoDiscoverySpecs field. I think that can be done as NodeGroupDiscoveryOptions.ParseLabelAutoDiscoverySpecs is currently only called from cloudprovider/azure anyway.

Similar thing should also be done for GCE and AWS connectors. If you are willing to do that would super great! Those can be separate PRs.

}, ", ")

// A LabelAutoDiscoveryConfig specifies how to autodiscover Azure scale sets.
type LabelAutoDiscoveryConfig struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

private?

@@ -459,3 +461,63 @@ func extractTaintsFromAsg(tags []*autoscaling.TagDescription) []apiv1.Taint {
}
return taints
}

// An ASGAutoDiscoveryConfig specifies how to autodiscover AWS ASGs.
type ASGAutoDiscoveryConfig struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

private

@alexeldeib
Copy link
Member Author

The commits aren't perfectly self-contained because they all depend on the common code, but I broke it into azure/aws/gce/common. Hopefully that's easier to review

@losipiuk
Copy link
Contributor

The commits aren't perfectly self-contained because they all depend on the common code, but I broke it into azure/aws/gce/common. Hopefully that's easier to review

That is fine. I will not fight over minor cleanups :) Thanks a lot.

/lgtm
/approve

Putting on hold so @Jeffwan can take a look
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 17, 2019
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 17, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feiskyer, losipiuk

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2019
@feiskyer
Copy link
Member

@losipiuk thanks for the discussion and reviewing the PR. kindly ping @Jeffwan for another look

@losipiuk
Copy link
Contributor

@Jeffwan PTAL :)

@alexeldeib
Copy link
Member Author

/assign @Jeffwan

@Jeffwan
Copy link
Contributor

Jeffwan commented Oct 27, 2019

LGTM. Seems I am the only reviewer block this PR. I can cancel the hold.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 27, 2019
@k8s-ci-robot k8s-ci-robot merged commit 589cd2a into kubernetes:master Oct 27, 2019
@fiunchinho
Copy link
Contributor

Do you have an ETA on when this change will be released? Thanks for the work!!

@feiskyer
Copy link
Member

@fiunchinho this is a new feature and the code changes are a little large. So we don't cherry pick it to old releases, hence it would only be included together with Kubernetes v1.17.

hichemaichour added a commit to hichemaichour/autoscaler that referenced this pull request Mar 2, 2020
feat: enable min/max on Azure VMSS autodiscovery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants