Skip to content

Commit a4e9819

Browse files
committed
fix: update MySQL To use GitHub secrets
1 parent fc2b2fe commit a4e9819

2 files changed

Lines changed: 6 additions & 134 deletions

File tree

k8s-gcp/database/password-change-job.yaml

Lines changed: 0 additions & 125 deletions
This file was deleted.

k8s-gcp/database/secret.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# DATABASE CREDENTIALS SECRET
33
# ============================================
44
# Contains MySQL root password, database name, user, and password
5-
# NOTE: In production, use proper secret management (Sealed Secrets, External Secrets Operator, etc.)
5+
# Values are injected from GitHub Secrets and encoded to base64 during deployment
66
#
7-
# To update values:
8-
# echo -n 'your-value' | base64
7+
# GitHub Secrets should store PLAIN TEXT values, not base64
8+
# The workflow will encode them using: echo -n 'value' | base64
99
apiVersion: v1
1010
kind: Secret
1111
metadata:
@@ -15,12 +15,9 @@ metadata:
1515
app: apartment-system
1616
component: database
1717
type: Opaque
18-
data:
19-
# Default values (base64 encoded):
20-
# root-password: from GitHub Secret MYSQL_ROOT_PASSWORD
21-
# database: from GitHub Secret MYSQL_DATABASE
22-
# username: from GitHub Secret MYSQL_USERNAME
23-
# password: from GitHub Secret MYSQL_PASSWORD
18+
stringData:
19+
# Using stringData instead of data - Kubernetes will auto-encode to base64
20+
# GitHub Secrets should contain plain text values
2421
root-password: ${MYSQL_ROOT_PASSWORD}
2522
database: ${MYSQL_DATABASE}
2623
username: ${MYSQL_USERNAME}

0 commit comments

Comments
 (0)