Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions agent/docker/deepflow-agent-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ spec:
imagePullPolicy: Never
securityContext:
privileged: true
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
volumeMounts:
- name: sys-kernel-debug
mountPath: /sys/kernel/debug
Expand Down
12 changes: 12 additions & 0 deletions agent/src/integration_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,18 @@ async fn handler(
.body(doc_bytes.as_slice().into())
.unwrap())
}
// Health check endpoint for liveness probe
(&Method::GET, "/v1/health/") => Ok(Response::builder()
.status(StatusCode::OK)
.header("Content-Type", "application/json")
.body(r#"{"status":"healthy"}"#.into())
.unwrap()),
// Readiness probe endpoint - returns 200 when the server is ready to accept traffic
(&Method::GET, "/v1/ready/") => Ok(Response::builder()
.status(StatusCode::OK)
.header("Content-Type", "application/json")
.body(r#"{"status":"ready"}"#.into())
.unwrap()),
// OpenTelemetry trace integration
(&Method::POST, "/api/v1/otel/trace") => {
if external_trace_integration_disabled {
Expand Down