Skip to content

Conversation

@majiayu000
Copy link

Summary

This PR fixes #2311

Adds Kubernetes readiness and liveness probes to the deepflow-agent, following standard K8s patterns.

Changes

  • Add /v1/ready/ endpoint to integration collector for readiness probe
  • Add /v1/health/ endpoint to integration collector for liveness probe
  • Configure readiness and liveness probes in DaemonSet YAML on port 38086

Implementation Details

  • Readiness probe: /v1/ready/ returns 200 with {"status":"ready"} when the integration collector HTTP server is ready to accept traffic
  • Liveness probe: /v1/health/ returns 200 with {"status":"healthy"} when the server is running
  • Both probes use the integration collector's HTTP server on port 38086 (the default external agent HTTP proxy port)

Probe Configuration

readinessProbe:
  httpGet:
    path: /v1/ready/
    port: 38086
  initialDelaySeconds: 5
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 3

livenessProbe:
  httpGet:
    path: /v1/health/
    port: 38086
  initialDelaySeconds: 15
  periodSeconds: 20
  timeoutSeconds: 5
  failureThreshold: 3

Test plan

  • Deploy the agent as a DaemonSet and verify probes work correctly
  • Verify readiness probe passes when agent is ready
  • Verify liveness probe passes when agent is healthy
  • Verify pod restarts if liveness probe fails

🤖 Generated with Claude Code

Add health check endpoints to the agent's integration collector HTTP server:
- /v1/health/ - liveness probe endpoint
- /v1/ready/ - readiness probe endpoint

Configure Kubernetes probes in the DaemonSet manifest:
- readinessProbe: checks /v1/ready/ with 5s initial delay
- livenessProbe: checks /v1/health/ with 15s initial delay

This follows the standard Kubernetes pattern for health probes and helps
with proper pod lifecycle management in Kubernetes environments.

Closes deepflowio#2311

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: majiayu000 <1835304752@qq.com>
@CLAassistant
Copy link

CLAassistant commented Dec 30, 2025

CLA assistant check
All committers have signed the CLA.

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.

[FR] FR-015: deepflow agent add readiness probe

2 participants