gitpod/components/ws-manager/telepresence.sh
Manuel Alejandro de Brito Fontes 9dfea94c9b Run shellcheck against scripts
2021-06-04 16:26:37 -04:00

16 lines
599 B
Bash
Executable File

#!/bin/bash
if [ "$1" == "intp" ]; then
echo "starting delve"
dlv debug --listen=127.0.0.1:32991 --headless --api-version=2 github.com/gitpod-io/gitpod/ws-manager -- run -v --config /tmp/c/config/config.json --kubeconfig ~/.kube/config
exit $?
fi
alsoProxy=""
for h in $(kubectl get pods -l component=ws-daemon --no-headers -o=custom-columns=:status.hostIP | grep -v none); do
echo "Also proxying ws-daemon daemon on ${h}"
alsoProxy="${alsoProxy} --also-proxy ${h}"
done
telepresence "${alsoProxy}" --mount /tmp/c --swap-deployment ws-manager --method vpn-tcp --run "$0" intp