fix(k8s): add procps to worker images and fix probe commands

- Add procps to git-hook and email-worker Dockerfiles (provides pgrep)
- Change all exec probes from pgrep to kill -0 1 (more reliable, bash built-in)
- Add startupProbe to gitserver with 30 failure threshold (5min max startup time)
- Increase gitserver liveness initialDelay to 30s for slower SSH init
This commit is contained in:
ZhenYi 2026-04-15 22:13:16 +08:00
parent afbc58d9bf
commit c033cc3ff8
3 changed files with 15 additions and 8 deletions

View File

@ -281,7 +281,7 @@ gitserver:
livenessProbe:
tcpSocket:
port: 8022
initialDelaySeconds: 10
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 5
failureThreshold: 3
@ -289,11 +289,18 @@ gitserver:
readinessProbe:
tcpSocket:
port: 8022
initialDelaySeconds: 5
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
startupProbe:
tcpSocket:
port: 8022
initialDelaySeconds: 0
periodSeconds: 10
failureThreshold: 30
persistence:
enabled: true
storageClass: ""
@ -324,7 +331,7 @@ emailWorker:
command:
- /bin/sh
- -c
- "pgrep email-worker || exit 1"
- "kill -0 1 || exit 1"
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
@ -335,7 +342,7 @@ emailWorker:
command:
- /bin/sh
- -c
- "pgrep email-worker || exit 1"
- "kill -0 1 || exit 1"
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 3
@ -373,7 +380,7 @@ gitHook:
command:
- /bin/sh
- -c
- "pgrep git-hook || exit 1"
- "kill -0 1 || exit 1"
initialDelaySeconds: 10
periodSeconds: 15
timeoutSeconds: 5
@ -384,7 +391,7 @@ gitHook:
command:
- /bin/sh
- -c
- "pgrep git-hook || exit 1"
- "kill -0 1 || exit 1"
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3

View File

@ -2,7 +2,7 @@
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates libssl3 \
ca-certificates libssl3 procps \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app

View File

@ -2,7 +2,7 @@
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates libssl3 openssh-client \
ca-certificates libssl3 openssh-client procps \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app