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

KEP for HPA scaling based on container resources #1609

Merged

Conversation

arjunrn
Copy link
Contributor

@arjunrn arjunrn commented Mar 11, 2020

This is an initial proposal to have scaling for target based on container resources.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 11, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @arjunrn. 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 /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.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. labels Mar 11, 2020
@arjunrn
Copy link
Contributor Author

arjunrn commented Mar 11, 2020

/assign josephburnett

### Risks and Mitigations

In order to keep backward compatibility with the existing API both `ResourceMetricSource` and
`PodResourceMetricSource` will be supported. Existing HPAs will continue functioning like before.
Copy link
Member

Choose a reason for hiding this comment

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

Again, maybe we should wait to rename a field until the V2 GA API.

@arjunrn arjunrn force-pushed the hpa-pod-resource-granularity branch from 67016b7 to 9b1fadd Compare March 25, 2020 16:03
Copy link
Member

@josephburnett josephburnett 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

Nicely written!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 30, 2020
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
@arjunrn arjunrn force-pushed the hpa-pod-resource-granularity branch from 9b1fadd to 1c6f86b Compare March 30, 2020 14:18
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 30, 2020
Copy link
Member

@gjtempleton gjtempleton left a comment

Choose a reason for hiding this comment

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

Nicely written, and well expressed.

One thing other than some minor nitpicks is whether it's worth explicitly calling out in the user stories how it would behave if ContainerResource and PodResource/Resource metrics were used as I could see users adopting this cautiously alongside existing working setups.

Comment on lines 42 to 43
of the individual container usage values of the pod. This is unsuitable for workloads where
the usage of the containers are not strongly correlated or change in lockstep. This KEP
Copy link
Member

Choose a reason for hiding this comment

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

This sentence currently reads unclearly to me - it seems to imply that the current HPA behaviour is unsuitable for workloads where the usage of the containers do change in lockstep though I realise that's not the intent.

@arjunrn arjunrn force-pushed the hpa-pod-resource-granularity branch from 467bdfe to 6b54b56 Compare April 2, 2020 11:21
@arjunrn
Copy link
Contributor Author

arjunrn commented Apr 2, 2020

One thing other than some minor nitpicks is whether it's worth explicitly calling out in the user stories how it would behave if ContainerResource and PodResource/Resource metrics were used as I could see users adopting this cautiously alongside existing working setups.
@gjtempleton Thanks for the review. I've added a user story outlining what the scaling would look like when both sources are used.

Copy link
Contributor

@mwielgus mwielgus 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 lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 3, 2020
@mwielgus
Copy link
Contributor

mwielgus commented Apr 3, 2020

Looks good, let's merge it, there will be probably minor adjustments after code/api review anyway.

@mwielgus
Copy link
Contributor

mwielgus commented Apr 3, 2020

Please fix Table of Content.

�[0;31mFAILED�[0m   verify-toc.sh	6s
========================
�[0;31mFAILED TESTS�[0m
========================
�[0;31m./hack/../hack/verify-toc.sh�[0m

Co-Authored-By: Guy Templeton <guyjtempleton@googlemail.com>
@arjunrn arjunrn force-pushed the hpa-pod-resource-granularity branch from 6b54b56 to 28b274b Compare April 3, 2020 08:33
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 3, 2020
@arjunrn
Copy link
Contributor Author

arjunrn commented Apr 3, 2020

/test pull-enhancements-verify

@k8s-ci-robot
Copy link
Contributor

@arjunrn: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-enhancements-verify

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.

@linki
Copy link
Member

linki commented Apr 3, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 3, 2020
@mwielgus
Copy link
Contributor

mwielgus commented Apr 3, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 3, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arjunrn, josephburnett, mwielgus

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 merged commit d730617 into kubernetes:master Apr 3, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Apr 3, 2020
@arjunrn arjunrn deleted the hpa-pod-resource-granularity branch April 3, 2020 12:06
RomanBednar pushed a commit to RomanBednar/enhancements that referenced this pull request Jul 30, 2024
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/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. 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.

6 participants