fix: align secret key references — backend was looking for DB_USER which doesn't exist
All checks were successful
scrum-manager/pipeline/head This commit looks good
All checks were successful
scrum-manager/pipeline/head This commit looks good
Root cause: backend deployment.yaml referenced secretKeyRef key: DB_USER and key: DB_PASSWORD, but the live secret only has MYSQL_USER and MYSQL_PASSWORD. kubectl apply reported secret/mysql-secret as "unchanged" (last-applied matched desired) so the drift was never caught — new pods got CreateContainerConfigError. Changes: - backend/deployment.yaml: DB_USER → key: MYSQL_USER, DB_PASSWORD → key: MYSQL_PASSWORD - mysql/deployment.yaml: add MYSQL_USER/MYSQL_PASSWORD env vars so the app user (scrumapp) is created if MySQL ever reinitializes from a fresh PVC - mysql/secret.yaml: remove stale commented-out block with old key names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,18 @@ spec:
|
||||
# Allow root to connect from backend pods (any host), not just localhost.
|
||||
- name: MYSQL_ROOT_HOST
|
||||
value: "%"
|
||||
# Create the app user on first init. Required if PVC is ever wiped and
|
||||
# MySQL reinitializes — otherwise scrumapp user won't exist and backend fails.
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user