From 28cbd3187c27b7efdba5c2096459819e50bd2fab Mon Sep 17 00:00:00 2001 From: tegwick Date: Fri, 3 Jul 2026 22:32:34 +0200 Subject: [PATCH] Fix in-cluster runner startup and readiness probes Wait for DinD before starting forgejo-runner daemon; use TCP/_ping probes so the Deployment reports available once both containers are up. --- manifests/forgejo-runner.yaml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/manifests/forgejo-runner.yaml b/manifests/forgejo-runner.yaml index 3ec2e3e..3db38ea 100644 --- a/manifests/forgejo-runner.yaml +++ b/manifests/forgejo-runner.yaml @@ -101,9 +101,9 @@ spec: - tcp://0.0.0.0:2375 - --tls=false readinessProbe: - exec: - command: [docker, info] - initialDelaySeconds: 5 + tcpSocket: + port: 2375 + initialDelaySeconds: 10 periodSeconds: 10 - name: runner image: code.forgejo.org/forgejo/runner:6.3.1 @@ -111,18 +111,26 @@ spec: env: - name: DOCKER_HOST value: tcp://127.0.0.1:2375 - command: - - forgejo-runner - - daemon - - --config - - /data/config.yaml + command: ["/bin/sh", "-c"] + args: + - | + set -eu + echo "waiting for DinD..." + for i in $(seq 1 90); do + if wget -q -O- http://127.0.0.1:2375/_ping 2>/dev/null | grep -q OK; then + echo "DinD ready" + break + fi + sleep 2 + done + exec forgejo-runner daemon --config /data/config.yaml volumeMounts: - name: data mountPath: /data readinessProbe: exec: - command: [forgejo-runner, -v] - initialDelaySeconds: 10 + command: ["/bin/sh", "-c", "wget -q -O- http://127.0.0.1:2375/_ping | grep -q OK"] + initialDelaySeconds: 15 periodSeconds: 30 volumes: - name: data