Skip to content

feat: add retry logic and pod restart monitoring - #1

Open
narayanareddy11 wants to merge 1 commit into
mainfrom
feature/add-health-checks
Open

feat: add retry logic and pod restart monitoring#1
narayanareddy11 wants to merge 1 commit into
mainfrom
feature/add-health-checks

Conversation

@narayanareddy11

Copy link
Copy Markdown
Owner

Summary

  • 05_devops_dashboard.py — Added _retry_http_get() helper with configurable retry count for transient HTTP failures when polling Jenkins/SonarQube
  • 06_kubernetes_manager.py — Added get_pod_restarts() MCP tool that lists all pods with restart counts, sorted descending — useful for spotting crash-looping containers

Changes

devops-dashboard

def _retry_http_get(url, auth, retries=3, timeout=8) -> dict | None:
    """HTTP GET with simple retry logic for transient failures."""

kubernetes-manager

@mcp.tool()
def get_pod_restarts(namespace: str = NS) -> str:
    """List pods with restart counts sorted by most restarts."""

Test plan

  • Run full_stack_health() — should retry on first transient failure
  • Run get_pod_restarts() — should return JSON list sorted by restart count
  • Verify existing tools unaffected by changes

🤖 Generated with Claude Code

- devops-dashboard: add _retry_http_get() for transient failures
- kubernetes-manager: add get_pod_restarts() tool to surface
  crash-looping containers sorted by restart count

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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