fix: add startup probe to kube-state-metrics to stop restart loop (HOMELAB-544) #134

Merged
aaron merged 1 commit from fix/HOMELAB-544-ksm-restart-loop into live 2026-04-02 05:07:08 +00:00
Owner

Summary

  • kube-state-metrics has 499 restarts in 6 days due to liveness probe killing the container before it finishes initializing 30+ resource watchers
  • Adds a startupProbe giving KSM up to 185s to initialize before liveness takes over
  • Liveness probe continues with standard timings after startup succeeds

Test plan

  • ArgoCD syncs the change
  • kube-state-metrics pod restarts with new probe config
  • Restart count stays at 0 after rollout

🤖 Generated with Claude Code

## Summary - kube-state-metrics has 499 restarts in 6 days due to liveness probe killing the container before it finishes initializing 30+ resource watchers - Adds a `startupProbe` giving KSM up to 185s to initialize before liveness takes over - Liveness probe continues with standard timings after startup succeeds ## Test plan - [ ] ArgoCD syncs the change - [ ] kube-state-metrics pod restarts with new probe config - [ ] Restart count stays at 0 after rollout 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: add startup probe to kube-state-metrics to stop restart loop (HOMELAB-544)
Some checks failed
0/0 projects applied successfully.
CI Review / ai-review (pull_request) Has been cancelled
CI Review / helm-validate (pull_request) Has been cancelled
CI Review / pr-title (pull_request) Has been cancelled
Lint & Validate / shellcheck (pull_request) Has been cancelled
Lint & Validate / yaml-lint (pull_request) Has been cancelled
Lint & Validate / terraform-validate (pull_request) Has been cancelled
f4d06af6b1
KSM lists/watches 30+ resource types on startup. Default liveness probe
(initialDelay=5s) kills the container at ~35s before caches are built,
causing 499 restarts in 6 days. Startup probe gives up to 185s for
initialization before liveness takes over.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aaron merged commit 726be83687 into live 2026-04-02 05:07:08 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aaron/infra-core!134
No description provided.