From c6f527c6a7be155fb4ce939c68c7483427940eb0 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Thu, 12 Mar 2026 17:08:52 +0100 Subject: [PATCH] redo jq command due to distro changes --- stacks/jupyterhub-keycloak/keycloak.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stacks/jupyterhub-keycloak/keycloak.yaml b/stacks/jupyterhub-keycloak/keycloak.yaml index 120a9b9b..6b0fb827 100644 --- a/stacks/jupyterhub-keycloak/keycloak.yaml +++ b/stacks/jupyterhub-keycloak/keycloak.yaml @@ -61,7 +61,9 @@ spec: while : do echo "Determining Keycloak public reachable address" - KEYCLOAK_ADDRESS=$(kubectl get svc keycloak -o json | jq -r --argfile endpoints <(kubectl get endpoints keycloak -o json) --argfile nodes <(kubectl get nodes -o json) '($nodes.items[] | select(.metadata.name == $endpoints.subsets[].addresses[].nodeName) | .status.addresses | map(select(.type == "ExternalIP" or .type == "InternalIP")) | min_by(.type) | .address | tostring) + ":" + (.spec.ports[] | select(.name == "https") | .nodePort | tostring)') + ENDPOINTS=$(kubectl get endpoints keycloak -o json) + NODES=$(kubectl get nodes -o json) + KEYCLOAK_ADDRESS=$(kubectl get svc keycloak -o json | jq -r --argjson endpoints "$ENDPOINTS" --argjson nodes "$NODES" '($nodes.items[] | select(.metadata.name == $endpoints.subsets[].addresses[].nodeName) | .status.addresses | map(select(.type == "ExternalIP" or .type == "InternalIP")) | min_by(.type) | .address | tostring) + ":" + (.spec.ports[] | select(.name == "https") | .nodePort | tostring)') echo "Found Keycloak running at $KEYCLOAK_ADDRESS" if [ ! -z "$KEYCLOAK_ADDRESS" ]; then