From 8d0088d46cda8337a451d29a4bd738536795f0e7 Mon Sep 17 00:00:00 2001 From: ycz008 Date: Tue, 2 Apr 2024 16:04:13 +0800 Subject: [PATCH] prod mysql secret for cm --- prod-upgrade/mysql/mysql-0.yaml | 19 ++++++++++++++----- prod-upgrade/mysql/mysql-1.yaml | 17 ++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/prod-upgrade/mysql/mysql-0.yaml b/prod-upgrade/mysql/mysql-0.yaml index 897f716..4c8c397 100644 --- a/prod-upgrade/mysql/mysql-0.yaml +++ b/prod-upgrade/mysql/mysql-0.yaml @@ -76,13 +76,22 @@ spec: image: mysql:8.0.33 env: - name: MYSQL_ROOT_PASSWORD - value: "Beaconfire@2099" + valueFrom: + secretKeyRef: + name: mysql + key: mysql_root + - name: MYSQL_USER + valueFrom: + secretKeyRef: + name: mysql + key: mysql_user + - name: MYSQL_PASSWORD + valueFrom: + secretKeyRef: + name: mysql + key: mysql_apps - name: MYSQL_DATABASE value: "test" - - name: MYSQL_USER - value: "app" - - name: MYSQL_PASSWORD - value: "HelloBeaconfire!" volumeMounts: - name: mysql-m mountPath: /var/lib/mysql diff --git a/prod-upgrade/mysql/mysql-1.yaml b/prod-upgrade/mysql/mysql-1.yaml index 4bc9640..ac8bd38 100644 --- a/prod-upgrade/mysql/mysql-1.yaml +++ b/prod-upgrade/mysql/mysql-1.yaml @@ -76,13 +76,20 @@ spec: image: mysql:8.0.33 env: - name: MYSQL_ROOT_PASSWORD - value: "Beaconfire@2099" - - name: MYSQL_DATABASE - value: "test" + valueFrom: + secretKeyRef: + name: mysql + key: mysql_root - name: MYSQL_USER - value: "app" + valueFrom: + secretKeyRef: + name: mysql + key: mysql_user - name: MYSQL_PASSWORD - value: "HelloBeaconfire!" + valueFrom: + secretKeyRef: + name: mysql + key: mysql_apps volumeMounts: - name: mysql-s mountPath: /var/lib/mysql