use statefulSets and readinessProbes instead of initContainers

This commit is contained in:
2025-12-17 20:45:01 +05:30
parent 66f824d41d
commit 0e6a52c1be
4 changed files with 24 additions and 33 deletions

View File

@@ -15,20 +15,18 @@ spec:
labels:
app: nextcloud
spec:
initContainers:
- name: wait-for-db
image: busybox
command:
- sh
- -c
- |
until nc -z -v -w30 nextcloud-db-service 3306; do
echo "Waiting for database to be ready..."
sleep 2
done
containers:
- name: nextcloud
image: lscr.io/linuxserver/nextcloud:32.0.3
readinessProbe:
exec:
command:
- sh
- -c
- nc -z nextcloud-db.tools.svc.cluster.local 3306
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 3
ports:
- containerPort: 443
env: