Skip to content

feat(spark): add entrypoint script for connect servers #1059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions spark-k8s/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
Expand Down Expand Up @@ -338,6 +339,7 @@ chown -h ${STACKABLE_USER_UID}:0 /stackable/spark/examples/jars/spark-examples.j
chmod g=u /stackable/spark
chmod g=u /stackable/jmx
chmod g=u /stackable/run-spark.sh
chmod g=u /stackable/run-spark-connect.sh
EOF

# ----------------------------------------
Expand Down
16 changes: 16 additions & 0 deletions spark-k8s/stackable/run-spark-connect.sh
Original file line number Diff line number Diff line change
@@ -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
Loading