This commit is contained in:
2026-02-22 12:07:42 +00:00
parent 503234c12f
commit e5633f9ebc

View File

@@ -36,6 +36,16 @@ spec:
secretKeyRef:
name: mysql-secret
key: DB_NAME
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: mysql-secret
key: MYSQL_USER
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-secret
key: MYSQL_PASSWORD
volumeMounts:
- name: mysql-data
mountPath: /var/lib/mysql
@@ -49,14 +59,14 @@ spec:
livenessProbe:
exec:
command: ["mysqladmin", "ping", "-h", "localhost"]
initialDelaySeconds: 90 # was 30 — must survive full init
initialDelaySeconds: 90
periodSeconds: 15
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
exec:
command: ["mysqladmin", "ping", "-h", "localhost"]
initialDelaySeconds: 60 # was 10 — critical fix
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 5
@@ -75,7 +85,7 @@ spec:
# spec:
# replicas: 1
# strategy:
# type: Recreate # MySQL requires Recreate since PVC is ReadWriteOnce
# type: Recreate
# selector:
# matchLabels:
# app.kubernetes.io/name: mysql
@@ -115,25 +125,17 @@ spec:
# memory: 1Gi
# livenessProbe:
# exec:
# command:
# - mysqladmin
# - ping
# - -h
# - localhost
# initialDelaySeconds: 30
# periodSeconds: 10
# command: ["mysqladmin", "ping", "-h", "localhost"]
# initialDelaySeconds: 90 # was 30 — must survive full init
# periodSeconds: 15
# timeoutSeconds: 5
# failureThreshold: 3
# readinessProbe:
# exec:
# command:
# - mysqladmin
# - ping
# - -h
# - localhost
# initialDelaySeconds: 10
# periodSeconds: 5
# timeoutSeconds: 3
# command: ["mysqladmin", "ping", "-h", "localhost"]
# initialDelaySeconds: 60 # was 10 — critical fix
# periodSeconds: 10
# timeoutSeconds: 5
# failureThreshold: 5
# volumes:
# - name: mysql-data