Skip to content

fix(helm): locate the dashboard healthcheck binary in probes - #146

Merged
Gkrumbach07 merged 1 commit into
ai-openshell:mainfrom
jgarciao:fix/chart-probe-binary-fallback
Nov 20, 2026
Merged

Gkrumbach07 merged 1 commit into
ai-openshell:mainfrom
jgarciao:fix/chart-probe-binary-fallback

Conversation

@jgarciao

Copy link
Copy Markdown
Contributor

Fixes #145.

What changed

The three probe defaults in values.yaml now select the binary at runtime:

dashboardCommand: ['/bin/sh', '-c', 'if [ -x /usr/local/bin/console ]; then exec /usr/local/bin/console --healthcheck; elif [ -x /usr/local/bin/openshell-dashboard ]; then exec /usr/local/bin/openshell-dashboard --healthcheck; else echo console-healthcheck-binary-not-found >&2; exit 127; fi']

probes.*.dashboardCommand still overrides it per probe, which is the escape hatch for an image without /bin/sh.

Why

0.1.4 is the first chart at oci://quay.io/ai-openshell/charts/console, and #142 renamed the probe binary in the same release that moved the chart:

chart <= 0.1.3   [/usr/local/bin/openshell-dashboard, --healthcheck]
chart    0.1.4   [/usr/local/bin/console, --healthcheck]

An image built against 0.1.3 or earlier installs under 0.1.4, starts, and serves, but all three probes exit 127 and the pod never becomes Ready. The pod events do not name the path. RHOAI 3.6 ships one of those images (registry.redhat.io/rhoai/odh-openshell-dashboard-rhel9, entrypoint /usr/local/bin/openshell-dashboard) and is under code freeze, so moving those installs onto the org-owned chart needs either this change or a per-probe override in the installer.

Why [ -x ] rather than a || b

exec replaces the shell, so exec a || exec b never reaches b when a is missing. A plain a || b has the opposite problem: both binaries run the same healthcheck, so an unhealthy server's exit 1 falls through and the second run returns 0. Selecting with [ -x ] keeps --healthcheck's exit 1 meaning "unhealthy".

Testing

Local runs against the two images in play:

  • quay.io/ai-openshell/console:0.1.4 (entrypoint /usr/local/bin/console): the snippet exits 1 with dial tcp 127.0.0.1:8080: connect: connection refused.
  • The RHOAI 3.6 image, in a cluster pod where /usr/local/bin holds only openshell-dashboard: the snippet exits 0 against the running BFF. The 0.1.4 default in the same pod exits 127.
  • make helm-lint, make helm-test (105 tests pass), and make helm-docs with nothing further generated.
  • helm template renders the command as ["/bin/sh","-c","…"]. toJson escapes the > and & of >&2 as \u003e and \u0026, which a JSON parser decodes back to the same shell string.

The override test in tests/security_test.yaml is untouched, and a new matchRegex per probe fails if the fallback is removed.

After this merges, a 0.1.5 release is needed before RHOAI can pin it.

🤖 Generated with Claude Code

@jgarciao
jgarciao requested a review from a team as a code owner November 20, 2026 14:38
Renaming the slug to console (ai-openshell#142) moved the chart to charts/console and changed the probe binary from /usr/local/bin/openshell-dashboard to /usr/local/bin/console in the same release, so 0.1.4 — the first chart at the org-owned repository — fails every probe for an image built against 0.1.3 or earlier, with nothing in the events naming the cause. Detect either binary with /bin/sh, then exec --healthcheck. Per-probe overrides are unchanged.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: Jorge Garcia Oncins <jgarciao@redhat.com>
@jgarciao
jgarciao force-pushed the fix/chart-probe-binary-fallback branch from 69c130c to d9c6ebe Compare November 20, 2026 14:43
@Gkrumbach07
Gkrumbach07 merged commit 247add2 into ai-openshell:main Nov 20, 2026
15 checks passed
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.

Chart 0.1.4 probes fail for an image built before the console rename

2 participants