feat(jupyterhub): add JupyterHub
This commit is contained in:
26
k8s/justfile
26
k8s/justfile
@@ -271,3 +271,29 @@ configure-registry:
|
||||
echo "Restarting k3s to apply registry configuration..."
|
||||
ssh "${LOCAL_K8S_HOST}" "sudo systemctl restart k3s"
|
||||
echo "✓ Registry configuration applied"
|
||||
|
||||
[positional-arguments]
|
||||
wait-deployments-ready *args:
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
namespace="$1"
|
||||
shift
|
||||
deployments=("$@")
|
||||
check_ready() {
|
||||
for deployment in "${deployments[@]}"; do
|
||||
ready=$(kubectl get -n ${namespace} deployment "${deployment}" \
|
||||
-o jsonpath="{.status.readyReplicas}" 2>/dev/null || true)
|
||||
replicas=$(kubectl get -n ${namespace} deployment "${deployment}" \
|
||||
-o jsonpath="{.status.replicas}" 2>/dev/null || true)
|
||||
if [[ "${ready}" != "${replicas}" || -z "${ready}" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
echo -n "Waiting for deployments $@ to be ready..."
|
||||
while check_ready; do
|
||||
echo -n "."
|
||||
sleep 2
|
||||
done
|
||||
echo "ok"
|
||||
|
||||
Reference in New Issue
Block a user