use statefulSets and readinessProbes instead of initContainers

This commit is contained in:
2025-12-17 20:43:24 +05:30
parent 239655d713
commit 2bc8629208
5 changed files with 38 additions and 52 deletions

View File

@@ -19,29 +19,26 @@ spec:
app: gitea-act-runner
spec:
restartPolicy: Always
hostNetwork: true
volumes:
- name: docker-certs
emptyDir: {}
- name: runner-data
persistentVolumeClaim:
claimName: gitea-act-runner-longhorn
initContainers:
- name: wait-for-gitea
image: busybox
command:
- sh
- -c
- |
while ! nc -z gitea.akshun-lab.cc 443; do
echo "Waiting for Gitea to be ready..."
sleep 5
done
echo "Gitea is ready!"
containers:
- name: runner
image: gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944
command: ["sh", "-c", "while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; /sbin/tini -- run.sh"]
readinessProbe:
exec:
command:
- sh
- -c
- |
nc -z gitea-int-service.git-ops.svc.cluster.local 3000
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 3
env:
- name: DOCKER_HOST
value: tcp://localhost:2376