Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
242951a000 |
@@ -106,8 +106,14 @@ spec:
|
|||||||
# Wait for the DinD sidecar to publish its TLS client certs into the shared
|
# Wait for the DinD sidecar to publish its TLS client certs into the shared
|
||||||
# emptyDir before starting the daemon — act_runner reads /certs/client/ca.pem at
|
# emptyDir before starting the daemon — act_runner reads /certs/client/ca.pem at
|
||||||
# startup and hard-exits if it is missing (a startup race against the sidecar).
|
# startup and hard-exits if it is missing (a startup race against the sidecar).
|
||||||
# Then exec the image's normal entrypoint (/sbin/tini -- /opt/act/run.sh), which
|
# The cert FILE appearing is necessary but NOT sufficient: dockerd writes the
|
||||||
# registers-from-env on first boot and runs `act_runner daemon`.
|
# certs and only THEN begins accepting TLS connections on :2376, so a runner that
|
||||||
|
# proceeds on the file alone still hard-exits with "cannot ping the docker daemon
|
||||||
|
# at tcp://localhost:2376" (observed crashlooping on node bounces / slow containerd
|
||||||
|
# starts). So after the certs appear, also wait until the daemon actually ACCEPTS
|
||||||
|
# a TCP connection on 2376 before exec'ing the image's normal entrypoint
|
||||||
|
# (/sbin/tini -- /opt/act/run.sh), which registers-from-env on first boot and runs
|
||||||
|
# `act_runner daemon`.
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
@@ -118,6 +124,12 @@ spec:
|
|||||||
[ "$i" -ge 60 ] && { echo "dind certs never appeared" >&2; exit 1; }
|
[ "$i" -ge 60 ] && { echo "dind certs never appeared" >&2; exit 1; }
|
||||||
echo "waiting for dind TLS certs ($i)"; sleep 1
|
echo "waiting for dind TLS certs ($i)"; sleep 1
|
||||||
done
|
done
|
||||||
|
j=0
|
||||||
|
until nc -z -w1 127.0.0.1 2376; do
|
||||||
|
j=$((j + 1))
|
||||||
|
[ "$j" -ge 60 ] && { echo "dind daemon never accepted connections on 2376" >&2; exit 1; }
|
||||||
|
echo "waiting for dind daemon on :2376 ($j)"; sleep 1
|
||||||
|
done
|
||||||
exec /sbin/tini -- /opt/act/run.sh
|
exec /sbin/tini -- /opt/act/run.sh
|
||||||
env:
|
env:
|
||||||
- name: GITEA_INSTANCE_URL
|
- name: GITEA_INSTANCE_URL
|
||||||
|
|||||||
Reference in new issue
Block a user