autoscaler
autoscaler copied to clipboard
Add podScaleUpDelay annotation support
Which component this PR applies to?
cluster-autoscaler
What type of PR is this?
/kind feature
What this PR does / why we need it:
Extends existing option/feature new-pod-scale-up-delay
that is global for all the pods and adds ability to specify custom delay per pod through annotation cluster-autoscaler.kubernetes.io/pod-scale-up-delay
. This allows better control over scale up process in the situations when we are running a lot of batch jobs at the regular intervals, like run this job every hour, but it is ok to wait 5 minutes to start.
Which issue(s) this PR fixes:
There was a discussion on this issue and someone suggested this solution. I liked it, implemented it, and it worked well for what I needed. https://github.com/kubernetes/autoscaler/issues/3916
Special notes for your reviewer:
Does this PR introduce a user-facing change?
A new annotation `cluster-autoscaler.kubernetes.io/pod-scale-up-delay` has been added, which allows user to set `new-pod-scale-up-delay` per pod, instead of autoscaler wide configuration. Annotation value will be used only if it is larger then global `new-pod-scale-up-delay`.
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: damirda / name: Damir Marković (647547946fb49343d258bfdb96390eb66b067c94)
Welcome @damirda!
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. :smiley:
@x13n Thank you for your help with this PR so far! I added FAQ entry that basically covers my use case. I also added unit test for the existing function that I extended. Let me know if I should add more tests or if you think FAQ update should be more generalized.
This failing test seem to be flaky. Works fine locally and also master
is not broken.
Plus completely unrelated to my changes. What is the best way to handle that?
Never mind, restarting the build helped...
/lgtm
/assign @aleksandra-malinowska
@x13n Thank you for all your help on this PR. I will squash all the commits in the end and prepare this for a merge.
/cc @aleksandra-malinowska @feiskyer
Merge will happen automatically once this has both lgtm and approved labels, so I'd suggest doing it first (it will also reset the lgtm tag, so I'll need to reapply it).
/lgtm
/assign @towca
@towca Could we get a review here?
Looks good to me, thanks for the contribution!
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: damirda, towca
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~cluster-autoscaler/OWNERS~~ [towca]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment