Skip to content

Commit 47b3050

Browse files
committed
Use HTTP health check for llama-stack/ogx container
Replace the TCP socket readiness probe with a proper HTTP GET on /v1/health. Also, add a startup probe and liveness probe that will start only after the startup one succeeds. Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
1 parent 6a09734 commit 47b3050

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

internal/controller/lcore_deployment.go

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,38 @@ func buildLCorePodTemplateSpec(h *common_helper.Helper, ctx context.Context, ins
7272
Ports: []corev1.ContainerPort{{Name: "llama-stack", ContainerPort: LlamaStackContainerPort}},
7373
VolumeMounts: llamaStackMounts,
7474
Env: llamaEnvVars,
75+
StartupProbe: &corev1.Probe{
76+
ProbeHandler: corev1.ProbeHandler{
77+
HTTPGet: &corev1.HTTPGetAction{
78+
Path: "/v1/health",
79+
Port: intstr.FromInt32(LlamaStackContainerPort),
80+
},
81+
},
82+
PeriodSeconds: 10,
83+
TimeoutSeconds: 5,
84+
FailureThreshold: 30,
85+
},
86+
LivenessProbe: &corev1.Probe{
87+
ProbeHandler: corev1.ProbeHandler{
88+
HTTPGet: &corev1.HTTPGetAction{
89+
Path: "/v1/health",
90+
Port: intstr.FromInt32(LlamaStackContainerPort),
91+
},
92+
},
93+
PeriodSeconds: 10,
94+
TimeoutSeconds: 5,
95+
FailureThreshold: 3,
96+
},
7597
ReadinessProbe: &corev1.Probe{
7698
ProbeHandler: corev1.ProbeHandler{
77-
TCPSocket: &corev1.TCPSocketAction{
99+
HTTPGet: &corev1.HTTPGetAction{
100+
Path: "/v1/health",
78101
Port: intstr.FromInt32(LlamaStackContainerPort),
79102
},
80103
},
81-
InitialDelaySeconds: 5,
82-
PeriodSeconds: 10,
104+
PeriodSeconds: 10,
105+
TimeoutSeconds: 5,
106+
FailureThreshold: 3,
83107
},
84108
Resources: corev1.ResourceRequirements{
85109
Requests: corev1.ResourceList{

0 commit comments

Comments
 (0)