Skip to content

Sync with upstream (CA 1.36.0); non-blocking scale-up & resilient API handling - #26

Open
simonoff wants to merge 490 commits into
UpCloudLtd:feat/cluster-autoscaler-cloudprovider-upcloudfrom
amoniacou:chore/sync-upstream
Open

Sync with upstream (CA 1.36.0); non-blocking scale-up & resilient API handling#26
simonoff wants to merge 490 commits into
UpCloudLtd:feat/cluster-autoscaler-cloudprovider-upcloudfrom
amoniacou:chore/sync-upstream

Conversation

@simonoff

@simonoff simonoff commented Jun 8, 2026

Copy link
Copy Markdown

What type of PR is this?

/kind bug
/kind cleanup

What this PR does / why we need it:

Syncs the UpCloud provider branch with kubernetes/autoscaler:master
(CA 1.36.0, k8s deps v1.36.1) and hardens the provider against API latency and
a loop-blocking scale-up.

  • Upstream sync: merged kubernetes/autoscaler:master; adapted the provider
    to the new cloud-provider registration model — register via init()
    (RegisterCloudProvider/SetDefaultCloudProvider) in
    upcloud_cloud_provider.go and dropped the obsolete builder_upcloud.go,
    which redeclared AvailableCloudProviders/DefaultCloudProvider (now
    functions in builder.go). Bumped the vendored UpCloud Go SDK to v8.37.0.
  • Non-blocking scale-up: scaleNodeGroup no longer polls the node group to
    running state, which blocked the main loop for minutes on every scale-up
    (scaleUp took ~4m). The target size is updated immediately and the
    autoscaler tracks upcoming nodes via the provider's instance states. Node
    deletion keeps its wait.
  • Resilient refresh + API retries: added withRetry with exponential
    backoff (per-attempt timeout; retries on request timeouts and 429/5xx)
    around node-group reads and the Modify call, since the UpCloud Go SDK has no
    built-in retry. refresh() is now atomic — a transient API timeout keeps the
    previous cache instead of zeroing it (which previously left the group
    unhealthy with lost readiness tracking).
  • RBAC: granted volumeattachments (storage.k8s.io) and
    resourceclaims/resourceslices/deviceclasses (resource.k8s.io, DRA),
    required by the newer scheduler-framework informers.

Special notes for your reviewer:

  • The large diff is dominated by the upstream sync commit; the provider-specific
    changes live in cloudprovider/upcloud/ and cloudprovider/builder/.
  • Verified end-to-end on a live UKS cluster: instant scale-up, stable refresh
    under API latency, and correct scale-down. go build -tags upcloud (full
    binary) and go test -tags upcloud ./cloudprovider/upcloud/... pass; unit
    tests added for retry classification/backoff.

Does this PR introduce a user-facing change?

No

dependabot Bot and others added 30 commits May 4, 2026 15:11
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) in `/vertical-pod-autoscaler` from 1.9.0 to 1.10.1.


Updates `github.com/fsnotify/fsnotify` from 1.9.0 to 1.10.1
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](fsnotify/fsnotify@v1.9.0...v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-version: 1.10.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) in `/vertical-pod-autoscaler/test` from 2.28.1 to 2.28.3.


Updates `github.com/onsi/ginkgo/v2` from 2.28.1 to 2.28.3
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.28.1...v2.28.3)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-version: 2.28.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [losisin/helm-docs-github-action](https://github.com/losisin/helm-docs-github-action) from 1.8.0 to 2.0.0.
- [Release notes](https://github.com/losisin/helm-docs-github-action/releases)
- [Commits](losisin/helm-docs-github-action@2ccf3e7...3a4528e)

---
updated-dependencies:
- dependency-name: losisin/helm-docs-github-action
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…actions/losisin/helm-docs-github-action-2.0.0

Bump losisin/helm-docs-github-action from 1.8.0 to 2.0.0
Signed-off-by: PersistentJZH <zhihao.kan17@gmail.com>

Set distinct Kubernetes e2e report prefixes for the standard and DRA
autoscaling test runs so they write separate JUnit files in the shared
artifacts directory.
…les/vertical-pod-autoscaler/go_modules-30a154f43f

Bump github.com/fsnotify/fsnotify in /vertical-pod-autoscaler
…les/vertical-pod-autoscaler/test/go_modules-773c184d0e

Bump github.com/onsi/ginkgo/v2 in /vertical-pod-autoscaler/test
…-initcontainers-infinite-append

fix(recommender): prevent memory leak and severely perturbs recommendations in LoadPods
…nce-pool-instance-list

Ensure HasInstance and NodeGroupForNode derive from the same list + incremental updates
controller-runtime released 0.24.0, which is compatible with k8s 1.36.
Also, bumped controller-tools, as the previous version was generating
a deepcopy code for CapacityBuffers that wasn't compiling. The bug is
fixed in the new version. Regenerated the CRD code
This will improve the CA loop time massively, because when there are
many unschedulable capacity pods, CA will try to simulate every single
one of them. But if we add ownerreference as controller,
HintingSimulator have built-in optimization to avoid attempting
scheduling all the other pods when similar one is already unschedulable.
elmiko and others added 30 commits June 4, 2026 17:01
This change is being introduced to revert the removal of the
--scale-down-enabled flag which was introduced in pull request kubernetes#9412.
This flag should remain in deprecated state for at least 3 releases
before being removed, as per kubernetes deprecation policy.
Update Kubernetes dependencies to v1.36.1
initHistoryProvider built the Prometheus history provider config without
copying HistoryCPUMetric and HistoryMemoryMetric, so CPUMetricName and
MemoryMetricName stayed empty and the recommender queried Prometheus
without a metric name. Copy the two values into the provider config so
the flags take effect.

Signed-off-by: ulascansenturk <ulascansenturk@protonmail.com>
…ry-metric-flags

fix(vpa): honor --history-cpu-metric and --history-memory-metric flags
…-enabled

revert removal of scale-down-enabled flag
update contributing doc with deprecation policy
Bumps the non-kubernetes group with 1 update in the /vertical-pod-autoscaler directory: [github.com/prometheus/common](https://github.com/prometheus/common).
Bumps the non-kubernetes group with 1 update in the /vertical-pod-autoscaler/test directory: [github.com/prometheus/common](https://github.com/prometheus/common).


Updates `github.com/prometheus/common` from 0.68.0 to 0.68.1
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](prometheus/common@v0.68.0...v0.68.1)

Updates `github.com/prometheus/common` from 0.68.0 to 0.68.1
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](prometheus/common@v0.68.0...v0.68.1)

Updates `github.com/prometheus/common` from 0.68.0 to 0.68.1
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](prometheus/common@v0.68.0...v0.68.1)

Updates `github.com/prometheus/common` from 0.68.0 to 0.68.1
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](prometheus/common@v0.68.0...v0.68.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-version: 0.68.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-kubernetes
- dependency-name: github.com/prometheus/common
  dependency-version: 0.68.1
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-kubernetes
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.39.1 to 1.41.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.39.1...v1.41.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-version: 1.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…les/cluster-autoscaler/github.com/onsi/gomega-1.41.0

dependabot(deps): bump github.com/onsi/gomega from 1.39.1 to 1.41.0 in /cluster-autoscaler
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.28.1 to 2.29.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.28.1...v2.29.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-version: 2.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…les/cluster-autoscaler/github.com/onsi/ginkgo/v2-2.29.0

dependabot(deps): bump github.com/onsi/ginkgo/v2 from 2.28.1 to 2.29.0 in /cluster-autoscaler
…unters-to-zero

Initialize counters with zero in vpa-updater
…l-changes

Ensure that the VPA verify scripts run for documentation updates
…les/vertical-pod-autoscaler/non-kubernetes-7acdaae539

Bump the non-kubernetes group across 2 directories with 1 update
Make dependabot manage the VPA 1.7 release branch
Implement the isInfeasibleError function in the VPA updater which
was previously a placeholder returning false

With kubernetes/kubernetes merged (available from Kubernetes 1.36)
the PodResizeValidator admission plugin now rejects infeasible resize
requests at admission time, returning a Forbidden StatusError with
cause types NodeCapacity or UnsupportedPlatform

This detects those errors so VPA can correctly identify infeasible
resize attempts and avoid infinite retry loops in InPlace mode

Fixes: kubernetes#9646
Signed-off-by: Yashraj Shukla <shuklayashraj68@gmail.com>
So that we get fewer, larger PRs, and not a PR per patch
…ce-isinfeasible-error

feat: implement isInfeasibleError for VPA InPlace update mode
Group dependencies for VPA 1.7 patch updates
…l-selector

Add CapacityQuota test case for nil selector
Add mtrqq to cluster autoscaler reviewers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.