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

Feature/hpa upscale downscale delay configurable #42101

Conversation

Dmitry1987
Copy link
Contributor

@Dmitry1987 Dmitry1987 commented Feb 25, 2017

What this PR does / why we need it:
Makes "upscale forbidden window" and "downscale forbidden window" duration configurable in arguments of kube-controller-manager. Those are options of horizontal pod autoscaler.

Special notes for your reviewer:
Please have a look @DirectXMan12 , the PR as discussed in Slack.

Release note:

Make "upscale forbidden window" and "downscale forbidden window"  duration configurable in arguments of kube-controller-manager. Those are options of horizontal pod autoscaler. Right now are hardcoded 3 minutes for upscale, and 5 minutes to downscale.  But sometimes cluster administrator might want to change this for his own needs.

@k8s-ci-robot
Copy link
Contributor

Hi @Dmitry1987. 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 @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@k8s-ci-robot
Copy link
Contributor

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://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

Once you've signed, please reply here (e.g. "I signed it!") 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.

1 similar comment
@k8s-ci-robot
Copy link
Contributor

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://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

Once you've signed, please reply here (e.g. "I signed it!") 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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Feb 25, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 25, 2017
@dannyz29
Copy link

  • 1

@Dmitry1987
Copy link
Contributor Author

Hi @DirectXMan12 , one of the commits was made from ubuntu VM where I was testing. And other commits from windows. So, the commit from ubuntu has an "X", it thinks no CLA signed (the username of commit "Dmitry Shmakov" different from account username "Dmitry1987"...), is it ok and will be possible to merge, or I should fix this somehow?

@DirectXMan12
Copy link
Contributor

is it ok and will be possible to merge, or I should fix this somehow?

You'll need to fix it. You can amend the commit while using the --author flag to do so.

Copy link
Contributor

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

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

A couple of minor changes, otherwise looks good in general. Thanks for doing this! :-)

@@ -699,6 +699,10 @@ type KubeControllerManagerConfiguration struct {
// horizontalPodAutoscalerSyncPeriod is the period for syncing the number of
// pods in horizontal pod autoscaler.
HorizontalPodAutoscalerSyncPeriod metav1.Duration
// horizontalPodAutoscalerUpscaleForbiddenWindow is a period after which next upscale allowed.
Copy link
Contributor

Choose a reason for hiding this comment

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

you appear to have some indentation issues here

@@ -367,7 +375,7 @@ func (a *HorizontalController) reconcileAutoscaler(hpav1Shared *autoscalingv1.Ho
desiredReplicas = calculateScaleUpLimit(currentReplicas)
}

rescale = shouldScale(hpa, currentReplicas, desiredReplicas, timestamp)
rescale = shouldScale(a, hpa, currentReplicas, desiredReplicas, timestamp)
Copy link
Contributor

Choose a reason for hiding this comment

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

just make this a method of the HPA controller instead of passing the HPA as the first argument.

@DirectXMan12
Copy link
Contributor

cc @jszczepkowski

@timothysc timothysc added the sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. label Feb 27, 2017
@timothysc timothysc assigned DirectXMan12 and piosz and unassigned timothysc Feb 27, 2017
@timothysc
Copy link
Member

Punting to @piosz and @DirectXMan12. It doesn't appear that sig-instrumentation has their kubernetes team configured properly.

@snirad
Copy link

snirad commented Feb 27, 2017

Very nice !

@Dmitry1987 Dmitry1987 force-pushed the feature/hpa-upscale-downscale-delay-configurable branch from 44f0193 to 3306615 Compare February 27, 2017 20:38
@k8s-github-robot k8s-github-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 27, 2017
@Dmitry1987 Dmitry1987 force-pushed the feature/hpa-upscale-downscale-delay-configurable branch from 3306615 to abe024b Compare February 27, 2017 21:15
@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 27, 2017
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 27, 2017
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 27, 2017
@Dmitry1987
Copy link
Contributor Author

rebased and added needed params to "legacy_horizontal_test.go" (this file didn't yet exist in my branch), so test shouldn't fail now, i hope =) .

@jszczepkowski
Copy link
Contributor

@k8s-bot test this

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Mar 9, 2017

@Dmitry1987: The following test(s) failed:

Test name Commit Details Rerun command
Jenkins GCI GKE smoke e2e 84243f75fca1797283e8d9d66f616d056bcd0048 link @k8s-bot gci gke e2e test this
Jenkins GKE smoke e2e 84243f75fca1797283e8d9d66f616d056bcd0048 link @k8s-bot cvm gke e2e test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@Dmitry1987
Copy link
Contributor Author

Hi guys, from latest failed tests I found and fixed all "gofmt" needed files with "gofmt -s -w". But why "kops" test failed and where to fix what, I don't understand :( , can someone take a quick look at the log here: https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/42101/pull-kubernetes-e2e-kops-aws/16450/?log#log
there are errors like build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory which I have no idea how to fix or if they're related to my changes at all (or did those fail as chain reaction following 'bazel build'?).

The 3d test "/hack/verify-flags-underscore.py" failure I fixed too, added flags like it says to "hack/verify-flags/known-flags.txt"... so I just need help with kops test. Thanks :)

@Dmitry1987 Dmitry1987 force-pushed the feature/hpa-upscale-downscale-delay-configurable branch from b0b2309 to c23fa18 Compare March 9, 2017 13:17
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 9, 2017
@Dmitry1987
Copy link
Contributor Author

Hi @jszczepkowski , can you help with the bot? it doesn't run test after my last push... and I don't know what is the failure in 'kops' test, maybe you can help?

@jszczepkowski
Copy link
Contributor

@k8s-bot test this

@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 23, 2017
@Dmitry1987 Dmitry1987 force-pushed the feature/hpa-upscale-downscale-delay-configurable branch from 92a56fb to c23fa18 Compare March 24, 2017 17:21
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2017
@Dmitry1987 Dmitry1987 force-pushed the feature/hpa-upscale-downscale-delay-configurable branch 2 times, most recently from 22d6cd3 to 1f816cf Compare March 24, 2017 17:38
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2017
@Dmitry1987 Dmitry1987 force-pushed the feature/hpa-upscale-downscale-delay-configurable branch from 1f816cf to 965dab3 Compare March 24, 2017 18:01
@DirectXMan12
Copy link
Contributor

DirectXMan12 commented Mar 24, 2017

as long as the tests pass, looks good! 👍

@DirectXMan12
Copy link
Contributor

@k8s-bot ok to test

@DirectXMan12
Copy link
Contributor

/lgtm /approve

@Dmitry1987
Copy link
Contributor Author

Hi @deads2k, @mikedanese , do you have a minute to have a look at this PR?
It's really small, but we need this feature, and I don't want to rebuild the controller-manager myself with every k8s release we upgrade :P . Thanks in advance! :)

@deads2k
Copy link
Contributor

deads2k commented Apr 11, 2017

/approve

@deads2k deads2k added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 11, 2017
@mtaufen
Copy link
Contributor

mtaufen commented Apr 25, 2017

/approve
the changes in componentconfig lgtm

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, Dmitry1987, deads2k, mtaufen

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 44862, 42241, 42101, 43181, 44147)

@k8s-github-robot k8s-github-robot merged commit 6c8cb33 into kubernetes:master Apr 25, 2017
@Dmitry1987 Dmitry1987 deleted the feature/hpa-upscale-downscale-delay-configurable branch April 26, 2017 07:53
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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet