enhancements icon indicating copy to clipboard operation
enhancements copied to clipboard

HPA: Improve pod selection accuracy across workload types

Open omerap12 opened this issue 6 months ago β€’ 10 comments

Enhancement Description

HPA may include metrics from unrelated pods if they share the same labels as the target workload. This can cause incorrect scaling, such as staying at maxReplicas even when real usage is low. This proposal updates the HPA to only use pods directly managed by the target workload, avoiding incorrect metrics and improving scaling accuracy.

  • One-line enhancement description (can be used as a release note): Improve HPA pod selection accuracy across workload types
  • Kubernetes Enhancement Proposal: [in progress]
  • Discussion Link:
  • Primary contact (assignee): @omerap12, @adrianmoisey
  • Responsible SIGs: SIG Autoscaling
  • Enhancement target (which target equals to which milestone):
    • Alpha release target (x.y): 1.34
    • Beta release target (x.y):
    • Stable release target (x.y):
  • [ ] Alpha
    • [x] KEP (k/enhancements) update PR(s): https://github.com/kubernetes/enhancements/pull/5331
    • [ ] Code (k/k) update PR(s): https://github.com/kubernetes/kubernetes/pull/132018
    • [ ] Docs (k/website) update PR(s):

Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.

omerap12 avatar May 21 '25 13:05 omerap12

/sig autoscaling

omerap12 avatar May 21 '25 13:05 omerap12

/label lead-opted-in /milestone v1.34

gjtempleton avatar Jun 02 '25 23:06 gjtempleton

Hi @omerap12 @adrianmoisey πŸ‘‹, v1.34 Enhancements team here.

This is a reminder of the upcoming PRR Freeze on Thursday 12th June 2025.

By this date, there must be a PR open in k/enhancements with:

  • The KEP's PRR questionnaire filled out.
  • The kep.yaml updated with the stage, latest-milestone, and milestone struct filled out.
  • A PRR approval file with the PRR approver listed for the stage the KEP is targeting.

Having the PRR questionnaire filled out by this deadline will help ensure that the PRR team has enough time to review your KEP before Enhancements Freeze on Friday 20th June 2025. For more information on the PRR process, see here.

jenshu avatar Jun 06 '25 03:06 jenshu

Hello again @omerap12 @adrianmoisey πŸ‘‹, v1.34 Enhancements team here.

Just checking in as we approach enhancements freeze on 21:00 UTC Friday 20th June 2025 / 14:00 PST Friday 20th June 2025.

This enhancement is targeting stage alpha for v1.34 (correct me, if otherwise)

Here's where this enhancement currently stands:

  • [ ] KEP readme using the latest template has been merged into the k/enhancements repo.
  • [ ] KEP status is marked as implementable for latest-milestone: v1.34.
  • [ ] KEP readme has up-to-date graduation criteria
  • [ ] KEP has a production readiness review that has been completed and merged into k/enhancements. (For more information on the PRR process, check here). If your production readiness review is not completed yet, please make sure to fill the production readiness questionnaire in your KEP by the PRR Freeze deadline on Thursday 12th June 2025 so that the PRR team has enough time to review your KEP.

I see that you have a PR open with these changes.

  • [ ] In the kep.yaml, can you also update the status to implementable?

The status of this enhancement is marked as At risk for enhancements freeze. Please keep the issue description up-to-date with appropriate stages as well.

If you anticipate missing enhancements freeze, you can file an exception request in advance. Thank you!

jenshu avatar Jun 11 '25 03:06 jenshu

@jenshu ,status updated in c5f1960

omerap12 avatar Jun 11 '25 05:06 omerap12

Hi @omerap12 @adrianmoisey,

With all the requirements fulfilled, this enhancement is now marked as tracked for the upcoming enhancements freeze πŸš€

/label tracked/yes

jenshu avatar Jun 20 '25 01:06 jenshu

Thanks!

/assign @omerap12 @adrianmoisey

adrianmoisey avatar Jun 20 '25 07:06 adrianmoisey

Hi @omerap12, @adrianmoisey πŸ‘‹ -- this is Alejandro Leon (@88abb) from the 1.34 Communications Team!

For the 1.34 release, we are currently in the process of collecting and curating a list of potential feature blogs, and we'd love for you to consider writing one for your enhancement!

As you may be aware, feature blogs are a great way to communicate to users about features which fall into (but not limited to) the following categories:

  • This introduces some breaking change(s)
  • This has significant impacts and/or implications to users
  • ...Or this is a long-awaited feature, which would go a long way to cover the journey more in detail πŸŽ‰

To opt in to write a feature blog, could you please let us know and open a "Feature Blog placeholder PR" (which can be only a skeleton at first) against the website repository by Friday 11th July? For more information about writing a blog, please find the blog contribution guidelines πŸ“š

[!Tip] Some timeline to keep in mind:

  • 02:00 UTC Friday 11th July 2025: Feature blog PR freeze
  • Friday 8th August 2025: Feature blogs ready for review
  • You can find more in the release document

[!Note] In your placeholder PR, use XX characters for the blog date in the front matter and file name. We will work with you on updating the PR with the publication date once we have a final number of feature blogs for this release.

88abb avatar Jun 25 '25 13:06 88abb

Hi @omerap12 @adrianmoisey πŸ‘‹, 1.34 Docs Shadow here.

Does this enhancement work planned for 1.34 require any new docs or modification to existing docs? If so, please follows the steps here to open a PR against dev-1.34 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thursday 3rd July 2025 18:00 PDT.

Also, take a look at Documenting for a release to get yourself familiarize with the docs requirement for the release.

Thank you!

Urvashi0109 avatar Jun 26 '25 06:06 Urvashi0109

Hi @omerap12, @adrianmoisey πŸ‘‹ -- this is Alejandro Leon (@88abb) from the 1.34 Communications Team!

For the 1.34 release, we are currently in the process of collecting and curating a list of potential feature blogs, and we'd love for you to consider writing one for your enhancement!

As you may be aware, feature blogs are a great way to communicate to users about features which fall into (but not limited to) the following categories:

  • This introduces some breaking change(s)
  • This has significant impacts and/or implications to users
  • ...Or this is a long-awaited feature, which would go a long way to cover the journey more in detail πŸŽ‰

To opt in to write a feature blog, could you please let us know and open a "Feature Blog placeholder PR" (which can be only a skeleton at first) against the website repository by Friday 11th July? For more information about writing a blog, please find the blog contribution guidelines πŸ“š

Tip

Some timeline to keep in mind:

  • 02:00 UTC Friday 11th July 2025: Feature blog PR freeze
  • Friday 8th August 2025: Feature blogs ready for review
  • You can find more in the release document

Note

In your placeholder PR, use XX characters for the blog date in the front matter and file name. We will work with you on updating the PR with the publication date once we have a final number of feature blogs for this release.

Added here: https://github.com/kubernetes/website/pull/51391

omerap12 avatar Jun 26 '25 06:06 omerap12

Hey again @omerap12 @adrianmoisey πŸ‘‹, v1.34 Enhancements team here.

Just checking in as we approach code freeze and test freeze at 02:00 UTC Friday 25th July 2025 / 19:00 PDT Thursday 24th July 2025.

Here's where this enhancement currently stands:

  • [x] All PRs to the Kubernetes repo that are related to your enhancement are linked in the above issue description (for tracking purposes).
  • [ ] All PRs are ready to be merged (they have approved and lgtm labels applied) by the code freeze deadline. This includes tests.

Per the issue description, these are all of the implementation (code-related) PRs for 1.34, some of which are not merged yet:

  • https://github.com/kubernetes/kubernetes/pull/132628

Please let me know (and keep the issue description updated) if there are any other PRs in k/k that we should track for this KEP, so that we can maintain accurate status.

If the implementation work for this enhancement is occurring out-of-tree (i.e., outside of k/k), please link the relevant PRs in the issue description for visibility. Alternatively, if you're unable to provide specific PR links, a confirmation that all out-of-tree implementation work is complete and merged will help us finalize tracking and maintain accuracy.

The status of this enhancement is marked as At risk for code freeze.

If you anticipate missing code freeze, you can file an exception request in advance.

jenshu avatar Jul 09 '25 02:07 jenshu

Hey again @omerap12 @adrianmoisey πŸ‘‹, please take a look at Documenting for a release - PR Ready for Review to get your PR ready for review before Tuesday July 29th 2025 18:00 PST. Thank you!

Urvashi0109 avatar Jul 21 '25 09:07 Urvashi0109

Hi @omerap12 @adrianmoisey, Just a quick reminder of the upcoming code freeze and test freeze this week at 02:00 UTC Friday 25th July 2025 / 19:00 PDT Thursday 24th July 2025. All code and test PRs to k/k must have the approved and lgtm labels by the deadline. Thanks!

jenshu avatar Jul 21 '25 15:07 jenshu

Hey @jenshu , @Urvashi0109 , We will push this KEP to 1.35 instead of 1.34. Thanks

/remove milestone v1.34 /milestone v1.35

omerap12 avatar Jul 24 '25 06:07 omerap12

@omerap12: You must be a member of the kubernetes/milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Milestone Maintainers Team and have them propose you as an additional delegate for this responsibility.

In response to this:

Hey @jenshu , @Urvashi0109 , We will push this KEP to 1.35 instead of 1.34. Thanks

/remove milestone v1.34 /milestone v1.35

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-sigs/prow repository.

k8s-ci-robot avatar Jul 24 '25 06:07 k8s-ci-robot

@gjtempleton can you adjust the milestone label for 1.35? ( discussed it with @soltysh )

omerap12 avatar Jul 24 '25 06:07 omerap12

@omerap12 got it, I will move this to Deferred for 1.34. Thanks!

/milestone clear

jenshu avatar Jul 24 '25 23:07 jenshu

Hi @omerap12 :wave:, v1.35 Enhancements Lead here.

I am closing the v1.34 milestone now.

If you'd like to work on this enhancement in v1.35, please have the SIG lead opt-in by adding the lead-opted-in label, which ensures it gets added to the tracking board.

Thanks!

/remove-label lead-opted-in /remove-label tracked/yes

rayandas avatar Sep 17 '25 15:09 rayandas

/milestone v1.35 /label lead-opted-in

(on behalf of @adrianmoisey during transition period)

raywainman avatar Sep 29 '25 14:09 raywainman

Hello @adrianmoisey, @omerap12 πŸ‘‹, v1.35 Enhancements team here.

This is a reminder of the upcoming PRR freeze on Thursday 9th October 2025 (AoE) / Friday 10th October 2025, 12:00 UTC.

This enhancement is targeting stage alpha for v1.35 (correct me, if otherwise)

Here's where this enhancement currently stands:

  • [x] PR open or merged with the KEP's PRR questionnaire filled out.
  • [x] PR open or merged with kep.yaml updated with the stage, latest-milestone, and milestone struct filled out.
  • [x] PR open or merged with a PRR approval file with the PRR approver listed for the stage the KEP is targeting.

Note that the PRs are not required to be approved or merged by the PRR freeze deadline. Having the PRR questionnaire filled out by the deadline will help ensure that the PRR team has enough time to review your KEP before enhancements freeze on Thursday 16th October 2025 (AoE) / Friday 17th October 2025, 12:00 UTC. For more information on the PRR process, see here.

With all the PRR freeze requirements in place, this enhancement is now marked as Tracked for PRR freeze! Please keep the issue description up-to-date with appropriate stages as well.

Could you also please update the issue description with the KEP link and relevant milestones and PR.

/label tracked/yes

jmickey avatar Oct 05 '25 22:10 jmickey

Hello @adrianmoisey @omerap12 πŸ‘‹, v1.35 Enhancements team here.

Just checking in as we approach enhancements freeze on Thursday 16th October 2025 (AoE) / Friday 17th October 2025, 12:00 UTC.

This enhancement is targeting stage alpha for v1.35 (correct me, if otherwise)

Here's where this enhancement currently stands:

  • [X] KEP readme using the latest template has been merged into the k/enhancements repo.
  • [X] KEP status is marked as implementable for latest-milestone: v1.35. KEPs targeting stable will need to be marked as implemented after code PRs are merged.
  • [X] KEP readme has up-to-date graduation criteria.
  • [X] KEP has submitted a production readiness review request for approval and has a reviewer assigned.
  • [X] KEP has a production readiness review that has been completed and merged into k/enhancements. (For more information on the PRR process, check here).

With all the KEP requirements in place and merged into k/enhancements, this enhancement is all good for the upcoming enhancements freeze. πŸš€

The status of this enhancement is marked as Tracked for enhancements freeze. Please keep the issue description up-to-date with appropriate stages as well. Thank you!

jmickey avatar Oct 15 '25 02:10 jmickey

Hello @adrianmoisey @omerap12 πŸ‘‹, v1.35 Docs Shadow here.

Does this enhancement work planned for v1.35 require any new docs or modification to existing docs?

If so, please follow the steps here to open a PR against dev-1.35 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thursday 23th October 2025.

Also, take a look at Documenting for a release to get yourself familiarize with the docs requirement for the release. Thank you!

Jimmykhangnguyen avatar Oct 18 '25 16:10 Jimmykhangnguyen

Hello @omerap12, @adrianmoisey πŸ‘‹, this is Aakanksha (@aakankshabhende) from the v1.35 Communications Team!

For the v1.35 release, we are currently in the process of collecting and curating a list of potential feature blogs, and we'd love for you to consider writing one for your enhancement!

As you may be aware, feature blogs are a great way to communicate to users about features which fall into (but not limited to) the following categories:

  • This introduces some breaking change(s)
  • This has significant impacts and/or implications to users
  • ...Or this is a long-awaited feature, which would go a long way to cover the journey more in detail πŸŽ‰

To opt in to write a feature blog, could you please let us know and open a "Feature Blog placeholder PR" (which can be only a skeleton at first) against the website repository by Friday, 31st October? For more information about writing a blog, please find the blog contribution guidelines πŸ“š

[!Tip] Some timeline to keep in mind:

  • 12:00 UTC Friday, 31st October: Feature blog PR freeze
  • Friday, 21st November: Feature blogs ready for review
  • You can find more in the release document

[!Note] In your placeholder PR, use XX characters for the blog date in the front matter and file name. We will work with you on updating the PR with the publication date once we have a final number of feature blogs for this release.

aakankshabhende avatar Oct 19 '25 09:10 aakankshabhende

Hello @omerap12, @adrianmoisey πŸ‘‹, v1.35 Docs Lead here.

Does this enhancement work planned for v1.35 require any new docs or modification to existing docs? If so, please follow the steps here to open a PR against dev-1.35 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thursday 23th October 2025. Also, take a look at Documenting for a release to get yourself familiarize with the docs requirement for the release.

Thank you!

Urvashi0109 avatar Oct 20 '25 08:10 Urvashi0109

Placeholder PR has been created for docs - https://github.com/kubernetes/website/pull/52867

kernel-kun avatar Oct 22 '25 09:10 kernel-kun

Hi @omerap12, @adrianmoiseyπŸ‘‹, this is Aakanksha (@aakankshabhende) from v1.35 Communications Team here again!

This is a gentle reminder for the feature blog deadline mentioned above, which is 12:00 UTC Friday, 31st October. To opt in, please let us know and open a Feature Blog placeholder PR against k/website by the deadline. If you have any questions, please feel free to reach out to us!

[!Tip] Some timeline to keep in mind:

  • 12:00 UTC Friday, 31st October: Feature blog PR freeze
  • Friday, 21st November: Feature blogs ready for review
  • You can find more in the release document

[!Note] In your placeholder PR, use XX characters for the blog date in the front matter and file name. We will work with you on updating the PR with the publication date once we have a final number of feature blogs for this release.

aakankshabhende avatar Oct 27 '25 11:10 aakankshabhende

Hey again @omerap12, @adrianmoisey πŸ‘‹, v1.35 Enhancements team here,

Just checking in as we approach code freeze and test freeze at Thursday 6th November 2025 (AoE) / Friday 7th November 2025, 12:00 UTC.

Here's where this enhancement currently stands:

  • [x] All PRs to the Kubernetes repo that are related to your enhancement are linked in the above issue description (for tracking purposes).
  • [ ] All PRs are ready to be merged (they have approved and lgtm labels applied) by the code freeze deadline. This includes tests.

Per the issue description, these are all of the implementation (code-related) PRs for v1.35, some of which are not merged yet:

  • https://github.com/kubernetes/kubernetes/pull/132628

Please let me know (and keep the issue description updated) if there are any other PRs in k/k that we should track for this KEP, so that we can maintain accurate status.

If the implementation work for this enhancement is occurring out-of-tree (i.e., outside of k/k), please link the relevant PRs in the issue description for visibility. Alternatively, if you're unable to provide specific PR links, a confirmation that all out-of-tree implementation work is complete and merged will help us finalize tracking and maintain accuracy.

The status of this enhancement is marked as At risk for code freeze.

If you anticipate missing code freeze, you can file an exception request in advance.

jmickey avatar Nov 01 '25 18:11 jmickey

Hello @omerap12, @adrianmoisey πŸ‘‹, v1.35 Enhancements team here,

Unfortunately, the implementation (code-related) PRs associated with this enhancement are not in the merge-ready state by code-freeze and hence this enhancement is now removed from the v1.35 milestone.

If you still wish to progress this enhancement in v1.35, please file an exception request as soon as possible, within three days.

If you have already opened an exception request the KEP will be re-added to the milestone if the request is approved.

If you have any questions, you can reach out in the #release-enhancements channel on Slack and we'll be happy to help. Thanks!

/label tracked/no /remove-label tracked/yes /milestone clear

jmickey avatar Nov 07 '25 12:11 jmickey