Skip to content

Skip manual scaler scans with TTL cleanup#160

Open
tclinkenbeard-oai wants to merge 1 commit into
FoundationDB:mainfrom
tclinkenbeard-oai:dev/tclinkenbeard/joshua-scaler-ttl-scan
Open

Skip manual scaler scans with TTL cleanup#160
tclinkenbeard-oai wants to merge 1 commit into
FoundationDB:mainfrom
tclinkenbeard-oai:dev/tclinkenbeard/joshua-scaler-ttl-scan

Conversation

@tclinkenbeard-oai

@tclinkenbeard-oai tclinkenbeard-oai commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • skip manual failed-job retention and cleanup scans when USE_K8S_TTL_CONTROLLER=true
  • preserve the existing cleanup path when TTL cleanup is disabled

Why

With roughly 8k Joshua agent objects, the scaler spent more than 10 minutes in kubectl get jobs -o json before its first queue check even though TTL cleanup was enabled. The TTL path already relies on finished-job TTLs, so these scans are redundant.

Validation

  • bash -n k8s/agent-scaler/agent-scaler.sh
  • shellcheck -S warning k8s/agent-scaler/agent-scaler.sh
  • git diff --check

@tclinkenbeard-oai tclinkenbeard-oai marked this pull request as ready for review July 11, 2026 18:24
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