Skip to content

feat: use raw metrics over recording rule rollout#4329

Open
sidtuladhar wants to merge 7 commits into
masterfrom
u/sidtuladhar/PAASTA-18886/hpa-fix
Open

feat: use raw metrics over recording rule rollout#4329
sidtuladhar wants to merge 7 commits into
masterfrom
u/sidtuladhar/PAASTA-18886/hpa-fix

Conversation

@sidtuladhar

@sidtuladhar sidtuladhar commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

The worker-load HPA formula uses a missing_instances term (pods with no worker_busy data, assumed at 100% load) to account for pods that haven't reported metrics yet.

When pods disappear, worker_busy drops immediately but the recording rule k8s:deployment:pods_status_ready goes stale so pods start to appear missing and are assumed 100% load, causing the HPA to scale up.

This PR switches to raw kube-state-metric metrics so both sides reflect current state, which prevents any staleness and the HPA doesn't create phantom pods.

@sidtuladhar sidtuladhar requested a review from a team as a code owner June 2, 2026 13:47
@sidtuladhar sidtuladhar closed this Jun 5, 2026
@sidtuladhar sidtuladhar reopened this Jun 5, 2026
@sidtuladhar sidtuladhar added draft and removed draft labels Jun 5, 2026
@sidtuladhar sidtuladhar changed the title feat: add worker-load-2 metrics provider using raw KSM metrics feat: use raw metrics over recording rule rollout Jun 5, 2026
The system paasta config call added in d8bfaf8 requires /etc/paasta/
which doesn't exist in CI.
Comment thread paasta_tools/utils.py Outdated
Comment thread tests/test_setup_prometheus_adapter_config.py Outdated
Comment thread paasta_tools/setup_prometheus_adapter_config.py Outdated
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