diff --git a/k8s/base/mysql/deployment.yaml b/k8s/base/mysql/deployment.yaml index 1dd5230..226018d 100644 --- a/k8s/base/mysql/deployment.yaml +++ b/k8s/base/mysql/deployment.yaml @@ -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