use statefulSets and readinessProbes instead of initContainers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user