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