Skip to content

Use HTTP health check for llama-stack/ogx container#123

Open
umago wants to merge 1 commit into
openstack-lightspeed:lcore-migrationfrom
umago:ogx-health
Open

Use HTTP health check for llama-stack/ogx container#123
umago wants to merge 1 commit into
openstack-lightspeed:lcore-migrationfrom
umago:ogx-health

Conversation

@umago

@umago umago commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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.

Summary by CodeRabbit

  • Bug Fixes
    • Improved application health checks to use the service’s HTTP health endpoint, helping detect readiness, startup, and runtime issues more reliably.
    • Added startup and liveness checks so the service can recover more consistently from slow starts or unexpected failures.

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>
@openshift-ci openshift-ci Bot requested review from Akrog and lpiwowar June 24, 2026 14:29
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: umago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 205f4f53-b93f-4607-98b2-abf83d331beb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
internal/controller/lcore_deployment.go (1)

78-78: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract /v1/health into a shared constant.

Using one constant avoids probe-path drift when this endpoint changes.

Suggested diff
+const llamaStackHealthPath = "/v1/health"
+
 llamaStackContainer := corev1.Container{
@@
 		StartupProbe: &corev1.Probe{
 			ProbeHandler: corev1.ProbeHandler{
 				HTTPGet: &corev1.HTTPGetAction{
-					Path: "/v1/health",
+					Path: llamaStackHealthPath,
 					Port: intstr.FromInt32(LlamaStackContainerPort),
 				},
 			},
@@
 		LivenessProbe: &corev1.Probe{
 			ProbeHandler: corev1.ProbeHandler{
 				HTTPGet: &corev1.HTTPGetAction{
-					Path: "/v1/health",
+					Path: llamaStackHealthPath,
 					Port: intstr.FromInt32(LlamaStackContainerPort),
 				},
 			},
@@
 		ReadinessProbe: &corev1.Probe{
 			ProbeHandler: corev1.ProbeHandler{
 				HTTPGet: &corev1.HTTPGetAction{
-					Path: "/v1/health",
+					Path: llamaStackHealthPath,
 					Port: intstr.FromInt32(LlamaStackContainerPort),
 				},
 			},

Also applies to: 89-89, 100-100

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/controller/lcore_deployment.go` at line 78, Extract the hardcoded
"/v1/health" probe path into a shared constant and update all uses in the
deployment controller so they reference that symbol instead of repeating the
literal. Apply this in the code that builds the probe configuration around the
deployment setup logic, using the existing deployment-related functions and
structs as the touchpoints so the readiness, liveness, and startup probes stay
consistent if the endpoint changes.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@internal/controller/lcore_deployment.go`:
- Line 78: Extract the hardcoded "/v1/health" probe path into a shared constant
and update all uses in the deployment controller so they reference that symbol
instead of repeating the literal. Apply this in the code that builds the probe
configuration around the deployment setup logic, using the existing
deployment-related functions and structs as the touchpoints so the readiness,
liveness, and startup probes stay consistent if the endpoint changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7fa91c72-b782-4e08-8bb1-36c947f7a8cf

📥 Commits

Reviewing files that changed from the base of the PR and between 6a09734 and 47b3050.

📒 Files selected for processing (1)
  • internal/controller/lcore_deployment.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant