Skip to content

Conversation

@jakubin
Copy link
Contributor

@jakubin jakubin commented Jan 2, 2026

What type of PR is this?

/kind feature

What this PR does / why we need it:

StaticAutoscaler.filterOutYoungPods calculates pod age based on CA loop start time. Technically, this means that even with flag --new-pod-scale-up-delay=0s, CA might skip pods that were created between CA loop start and when pods where listed. --new-pod-scale-up-delay=0s should mean that filtering out young pods is disabled.

This is quite an edge case for normal pods, but we'd like to set the creation date for fake pods injected by CapacityBuffer to be able to measure how fast CapacityBuffer pods are processed. Without this PR, cluster autoscaler would filter out those fake pods on the first loop execution, delaying the capacity buffers processing.

Which issue(s) this PR fixes:

No issue

Special notes for your reviewer:

This was tested with with CA started locally running against GKE cluster with all autoscaling disabled:

  1. When --new-pod-scale-up-delay was not set (defaulted to 0s), CA immediately triggered MIG scale up
  2. With --new-pod-scale-up-delay=1m, the scale up happened after ~1m. Logs:
Initially:
I0102 15:08:41.234214 1598444 static_autoscaler.go:990] Pod ca-test-deployment-9d89c59d-vtsfm is 4.456 seconds old, too new to consider unschedulable

After 1m:
I0102 15:09:37.055125 1598444 klogx.go:87] Pod default/ca-test-deployment-9d89c59d-r96dp is unschedulable

Does this PR introduce a user-facing change?

With `--new-pod-scale-up-delay=0s` (or default value), pods created after CA loop start (i.e. with "negative" age) will not be filtered out.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/needs-area area/cluster-autoscaler labels Jan 2, 2026
@k8s-ci-robot
Copy link
Contributor

Hi @jakubin. Thanks for your PR.

I'm waiting for a github.com 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.

Details

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 k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 2, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jakubin
Once this PR has been reviewed and has the lgtm label, please assign aleksandra-malinowska for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants