Skip to content

Restore the dual-role server image for Spark on Kubernetes#2636

Merged
johngrimes merged 3 commits into
release/server/3.0.0from
dual-role-image
Jun 22, 2026
Merged

Restore the dual-role server image for Spark on Kubernetes#2636
johngrimes merged 3 commits into
release/server/3.0.0from
dual-role-image

Conversation

@johngrimes

Copy link
Copy Markdown
Member

Cluster-mode (Spark on Kubernetes) deployments of the 3.0.0 server image never reach Ready. Spark launches executor pods from the same image with the single argument executor, but the image's default entrypoint always starts the FHIR server, so executor pods never register and the driver hangs. This regressed in the 3.0.0 server/ rewrite, which dropped the v7.2.0 dispatching entrypoint.

This restores a role-dispatching entrypoint (server/src/main/jib/usr/bin/entrypoint.sh): executor launches KubernetesExecutorBackend, anything else launches the FHIR server. Since Jib ignores jvmFlags once an explicit entrypoint is set, the Java 21 module options move into the script for both roles. A Bash dry-run test (entrypoint-test.sh) verifies the dispatch logic without Docker or a cluster, run via exec-maven-plugin in the docker and dockerPreRelease profiles.

Verified locally with mvn clean package -Pdocker. The CSIRO cluster redeploy and live executor-registration check remain a manual follow-up.

Targets release/server/3.0.0 rather than main, since it builds on the v3.0.0 release branch (PR #2635).

Restore the server image's ability to run as either the FHIR server or a
Spark Kubernetes executor, selected by the container's first argument.
Spark on Kubernetes launches executor pods with the single argument
"executor" and no command override, so the role selection lives in the
image entrypoint. A Bash dry-run test covers the role-selection logic
without Docker, a network, or a cluster.
Set the dispatching entrypoint as the image's entry behaviour in both the
docker and dockerPreRelease profiles, copy it into the image via Jib
extraDirectories with executable permissions, and remove the now-dead
jvmFlags (Jib ignores them once an explicit entrypoint is set). Run the
dispatch test during the test phase of these profiles, gated by skipTests.
The citation pointed to the Spark 4.0.0 entrypoint; the runtime is Spark
4.0.2, whose executor branch is identical.
@johngrimes johngrimes marked this pull request as ready for review June 22, 2026 21:44
@johngrimes johngrimes merged commit c641a58 into release/server/3.0.0 Jun 22, 2026
4 checks passed
@johngrimes johngrimes deleted the dual-role-image branch June 22, 2026 21:44
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant