Skip to content
Merged
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
4 changes: 3 additions & 1 deletion modules/tutorials/examples/ldap-auth/40-modify-superset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ echo "Applying updated configuration"
kubectl apply -f superset.yaml
# end::apply-superset-cluster[]

sleep 1 # it takes time before the statefulset is recreated

echo "Waiting for superset StatefulSet ..."
kubectl rollout status --watch statefulset/superset-node-default

sleep 2 # just to be sure we're up and running
sleep 2 # just to be sure we're up and running
Comment on lines 32 to 37
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to change, but ideally we just use a kubectl wait supersetcluster/superset (pseudo code) here (same below for trino)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure. I think statefulsets are a bit weird for conditional waits.
I did try to put something in that I did for deployments, but it doesn't work for statefulsets: https://github.com/stackabletech/actions/blob/c34dbb4f27b274736c7d2edc6f6f30a03d03edf5/run-integration-test/action.yaml#L216-L218

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of something like kubectl wait --for=condition=available trinocluster/trino --timeout 1200s, can you give that a try?
For Superset that would be kubectl wait --for=condition=available supersetcluster/superset --timeout 1200s

Copy link
Member Author

@NickLarsenNZ NickLarsenNZ Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You try it and tell me :D
I don't have my cluster anymore.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess not super important 😅

2 changes: 2 additions & 0 deletions modules/tutorials/examples/ldap-auth/60-modify-trino.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ echo "Applying updated configuration"
kubectl apply -f trino.yaml
# end::apply[]

sleep 1 # it takes time before the statefulset is recreated

echo "Waiting for Trino StatefulSets rollout ..."
kubectl rollout status --watch statefulset/trino-coordinator-default
kubectl rollout status --watch statefulset/trino-worker-default
Expand Down
10 changes: 5 additions & 5 deletions modules/tutorials/examples/ldap-auth/80-verify-trino.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
set -euo pipefail


trino_version="476"
trino_download_url="https://repo.stackable.tech/repository/packages/trino-cli/trino-cli-${trino_version}-executable.jar"
trino_version="479"
trino_download_url="https://repo.stackable.tech/repository/packages/trino-cli/trino-cli-${trino_version}"

trino_login() {
local username="$1"
local password="$2"


trino_binary="./trino.jar"
trino_binary="./trino-cli"

if [[ ! -f "$trino_binary" ]]; then
echo "Downloading trino client ...";
curl -s --output "$trino_binary" "$trino_download_url"
chmod +x "$trino_binary"
fi

trino_addr=$(stackablectl svc list -o json | jq --raw-output '.trino| .[0] | .endpoints | .["coordinator-https"]')
trino_addr=$(stackablectl stacklet list -o json | jq --raw-output '.[] | select(.name == "trino") | .endpoints | .["coordinator-https"]')

output=$(echo "$password" | "$trino_binary" --insecure --output-format=CSV_UNQUOTED --server "$trino_addr" --user "$username" --execute "SHOW CATALOGS" --password)

Expand All @@ -33,7 +33,7 @@ password="alice"

echo "Testing trino login with $username:$password ..."
if trino_login "$username" "$password"; then
echo "Login sucessful"
echo "Login successful"
else
echo "Login unsuccessful"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions modules/tutorials/examples/ldap-auth/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ superset_login() {
request_data=$(printf '{"provider": "%s", "username": "%s", "password": "%s", "refresh": false}' "$provider" "$username" "$password")

local superset_addr
superset_addr=$(stackablectl svc list -o json | jq --raw-output '.superset| .[0] | .endpoints | .["external-superset"]')
superset_addr=$(stackablectl stacklet list -o json | jq --raw-output '.[] | select(.name == "superset") | .endpoints | .["node-http"]')
local superset_endpoint="$superset_addr"/api/v1/security/login

json_header='Content-Type: application/json'
Expand All @@ -21,4 +21,4 @@ superset_login() {
return 0
fi
return 1
}
}
Loading