Skip to content

kube manager autoscaler - #67

Open
avlllo wants to merge 2 commits into
mainfrom
feat/kube-manager-autoscaler
Open

avlllo wants to merge 2 commits into
mainfrom
feat/kube-manager-autoscaler

Conversation

@avlllo

@avlllo avlllo commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Add autoscaler

avlllo and others added 2 commits November 16, 2026 16:09
kube-manager can now scale event-processor and history-api from the
backlog of the queue each one consumes. Off by default
(AUTOSCALER_ENABLED / kube-manager.autoscaler.enabled).

- kube-manager/pkg/autoscaler: sampling loop, +1/-1 decision rule with
  per-target windows, cooldown stored in a Deployment annotation, and a
  Lease-based leader election so a single replica runs the loop
- lib/rabbit: MessageBroker.InspectQueue reports ready messages and
  consumers; it and Close return ErrReconnecting instead of blocking
  while the reconnect loop holds the lock
- helm: autoscaler values, env and a namespaced Role/RoleBinding for
  kube-manager; kube-manager now gets the shared rabbitmq Secret and
  ConfigMap, and CS_NAMESPACE set to the release namespace
- history-api: lower the default RUNTIME_EVENTS_BATCH_SIZE to 5000
- vendor k8s.io/client-go leaderelection and record

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…abled

The autoscaler Role and RoleBinding were only rendered when
autoscaler.enabled was set in the chart, so switching the autoscaler on
through AUTOSCALER_ENABLED alone left kube-manager without the lease,
deployment and event permissions. Render them whenever
serviceAccount.create is set, the same gate as the ClusterRole.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@avlllo
avlllo force-pushed the feat/kube-manager-autoscaler branch from 07c291a to e59958c Compare November 16, 2026 13:20
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.

1 participant