Restore the dual-role server image for Spark on Kubernetes#2636
Merged
Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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.0server/rewrite, which dropped the v7.2.0 dispatching entrypoint.This restores a role-dispatching entrypoint (
server/src/main/jib/usr/bin/entrypoint.sh):executorlaunchesKubernetesExecutorBackend, anything else launches the FHIR server. Since Jib ignoresjvmFlagsonce 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 thedockeranddockerPreReleaseprofiles.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.0rather thanmain, since it builds on the v3.0.0 release branch (PR #2635).