Skip to content

feat: implement HPA support via scale subresource for aggregators - #226

Closed
P0lskay wants to merge 3 commits into
kaasops:mainfrom
P0lskay:feat/add-scale-for-aggregators
Closed

P0lskay wants to merge 3 commits into
kaasops:mainfrom
P0lskay:feat/add-scale-for-aggregators

Conversation

@P0lskay

@P0lskay P0lskay commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Solved #225
This PR implements HPA support for Vector aggregators (VectorAggregator and ClusterVectorAggregator) by exposing the scale subresource in their Custom Resource Definitions (CRDs).

Changes

  • API & CRD Updates: Added the scale subresource to VectorAggregator and ClusterVectorAggregator CRDs to enable native Kubernetes HPA integration.
  • Controller Refactoring: Updated SetSuccessStatus and added new helper methods (GetDeployment, LabelsAsString).
  • RBAC: Added necessary permissions for the scale subresource in RBAC configurations.

P0lskay added 2 commits June 23, 2026 11:54
…torAggregator. Update SetSuccessStatus. Added new methods: GetDeployment, LabelsAsString. Added scale for RBAC
@P0lskay
P0lskay marked this pull request as ready for review June 23, 2026 09:48
@aa1ex

aa1ex commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Discussed in the Telegram group, summary for the record.

The current approach (scale subresource on the CR) can't work for ClusterVectorAggregator: HPA doesn't support cluster-scoped targets, so it only works for the namespaced VectorAggregator.

So we're looking at a different approach: add an autoscaling block to the spec and have the operator create and manage the HPA itself, targeting the underlying Deployment. The Deployment is namespaced in both cases, so this covers both VectorAggregator and ClusterVectorAggregator. The operator would also stop setting replicas when autoscaling is on, to not compete with the HPA.

This replaces the scale-subresource mechanism, so we'll likely rework the PR.

@P0lskay

P0lskay commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Rework in #230

@P0lskay P0lskay closed this Jun 26, 2026
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.

2 participants