Point Forgejo runner substrate at in-cluster railiance01 (ADR-004)

Status probe checks k8s runner first; documents retirement of coulombcore
interim host runner.
This commit is contained in:
2026-07-03 22:29:28 +02:00
parent 7aae00e933
commit dc341d7cc6
2 changed files with 58 additions and 49 deletions

View File

@@ -2,7 +2,8 @@
set -u
FORGEJO_URL="${FORGEJO_URL:-https://forgejo.coulomb.social}"
RUNNER_HOST="${RUNNER_HOST:-coulombcore}"
FORGEJO_KUBECONFIG="${FORGEJO_KUBECONFIG:-${HOME}/.kube/config-hosteurope}"
RUNNER_HOST="${RUNNER_HOST:-}"
RUNNER_SSH_USER="${RUNNER_SSH_USER:-}"
RUNNER_SSH_KEY="${RUNNER_SSH_KEY:-}"
SSH_CONNECT_TIMEOUT="${SSH_CONNECT_TIMEOUT:-5}"
@@ -25,8 +26,16 @@ else
echo "curl missing; skipping endpoint checks"
fi
section "Runner host probe"
if have ssh; then
section "In-cluster runner (railiance01)"
if have kubectl && [ -r "${FORGEJO_KUBECONFIG}" ]; then
KUBECONFIG="${FORGEJO_KUBECONFIG}" kubectl get deploy,pods,pvc -n forgejo -l app.kubernetes.io/name=forgejo-runner --ignore-not-found 2>/dev/null || true
KUBECONFIG="${FORGEJO_KUBECONFIG}" kubectl logs -n forgejo deploy/forgejo-runner -c runner --tail=5 2>/dev/null || true
else
echo "kubectl or kubeconfig missing; skipping in-cluster probe"
fi
section "Legacy host runner probe (optional)"
if [ -n "${RUNNER_HOST}" ] && have ssh; then
ssh_target="${RUNNER_HOST}"
if [ -n "${RUNNER_SSH_USER}" ]; then ssh_target="${RUNNER_SSH_USER}@${RUNNER_HOST}"; fi
ssh_args=(-o BatchMode=yes -o ConnectTimeout="${SSH_CONNECT_TIMEOUT}")
@@ -41,6 +50,8 @@ if have ssh; then
fi
if [ -f /var/lib/forgejo-runner/.runner ]; then echo "ok: /var/lib/forgejo-runner/.runner present"; fi
'
elif [ -n "${RUNNER_HOST}" ]; then
echo "ssh missing; skipping legacy host probe"
else
echo "ssh missing; skipping runner host probe"
echo "RUNNER_HOST unset; skipping legacy host probe"
fi