From 67f81c919f3261a60c3a039371b6c1db545d2d80 Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 17 Apr 2025 15:45:36 +0200 Subject: [PATCH 1/3] feat(spark): add entrypoint script for connect servers --- CHANGELOG.md | 2 ++ spark-k8s/stackable/run-spark-connect.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 spark-k8s/stackable/run-spark-connect.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index a15846112..c14313bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file. `check-permissions-ownership.sh` provided in stackable-base image ([#1025]). - zookeeper: check for correct permissions and ownerships in /stackable folder via `check-permissions-ownership.sh` provided in stackable-base image ([#1043]). +- spark-k8s: add entrypoint script for Connect servers ([#1059]). ### Changed @@ -75,6 +76,7 @@ All notable changes to this project will be documented in this file. [#1054]: https://github.com/stackabletech/docker-images/pull/1054 [#1055]: https://github.com/stackabletech/docker-images/pull/1055 [#1056]: https://github.com/stackabletech/docker-images/pull/1056 +[#1059]: https://github.com/stackabletech/docker-images/pull/1059 ## [25.3.0] - 2025-03-21 diff --git a/spark-k8s/stackable/run-spark-connect.sh b/spark-k8s/stackable/run-spark-connect.sh new file mode 100644 index 000000000..d17889cc9 --- /dev/null +++ b/spark-k8s/stackable/run-spark-connect.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +eval "$_STACKABLE_PRE_HOOK" + +containerdebug --output=/stackable/log/containerdebug-state.json --loop & + +/stackable/spark/sbin/start-connect-server.sh \ +--deploy-mode client \ +--master k8s://https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT_HTTPS} \ +--properties-file /stackable/spark/conf/spark-defaults.conf "$@" + +result=$? + +eval "$_STACKABLE_POST_HOOK" + +exit $result From 859329a10bb0325f00b9ec46a8e65c1d52da54fe Mon Sep 17 00:00:00 2001 From: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> Date: Thu, 17 Apr 2025 15:50:36 +0200 Subject: [PATCH 2/3] update Dockerfile --- spark-k8s/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spark-k8s/Dockerfile b/spark-k8s/Dockerfile index 4a1276c9d..645c779c5 100644 --- a/spark-k8s/Dockerfile +++ b/spark-k8s/Dockerfile @@ -306,6 +306,7 @@ COPY --chown=${STACKABLE_USER_UID}:0 --from=spark-builder /stackable/jmx /stacka COPY --from=spark-builder /usr/bin/tini /usr/bin/tini COPY --chown=${STACKABLE_USER_UID}:0 spark-k8s/stackable/run-spark.sh /stackable/run-spark.sh +COPY --chown=${STACKABLE_USER_UID}:0 spark-k8s/stackable/run-spark-connect.sh /stackable/run-spark-connect.sh COPY --chown=${STACKABLE_USER_UID}:0 spark-k8s/licenses /licenses RUN < Date: Thu, 17 Apr 2025 16:08:48 +0200 Subject: [PATCH 3/3] make run-spark-connect.sh executable --- spark-k8s/stackable/run-spark-connect.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 spark-k8s/stackable/run-spark-connect.sh diff --git a/spark-k8s/stackable/run-spark-connect.sh b/spark-k8s/stackable/run-spark-connect.sh old mode 100644 new mode 100755