mysql: Use separate file for secret + remove duplicated mysql name
This commit is contained in:
parent
a74475d61b
commit
956ce0deb9
4 changed files with 7 additions and 7 deletions
|
@ -31,7 +31,7 @@ spec:
|
||||||
- name: MYSQL_ROOT_PASSWORD
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: mysql-secret
|
name: secret
|
||||||
key: mysql-root-password
|
key: mysql-root-password
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: mysql-data
|
- name: mysql-data
|
||||||
|
|
|
@ -27,12 +27,12 @@ spec:
|
||||||
- name: PMA_HOST
|
- name: PMA_HOST
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: mysql-configmap
|
name: configmap
|
||||||
key: mysql-server
|
key: mysql-server
|
||||||
- name: PMA_USER
|
- name: PMA_USER
|
||||||
value: root
|
value: root
|
||||||
- name: PMA_PASSWORD
|
- name: PMA_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: mysql-secret
|
name: secret
|
||||||
key: mysql-root-password
|
key: mysql-root-password
|
|
@ -26,10 +26,9 @@ patches:
|
||||||
- path: replica.yaml
|
- path: replica.yaml
|
||||||
|
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: mysql-configmap
|
- name: configmap
|
||||||
env: mysql-configmap.properties
|
env: mysql-configmap.properties
|
||||||
|
|
||||||
secretGenerator:
|
secretGenerator:
|
||||||
- name: mysql-secret
|
- name: secret
|
||||||
literals:
|
env: mysql-secret.properties
|
||||||
- mysql-root-password=root
|
|
1
mysql/kustomize/overlays/default/mysql-secret.properties
Normal file
1
mysql/kustomize/overlays/default/mysql-secret.properties
Normal file
|
@ -0,0 +1 @@
|
||||||
|
mysql-root-password=root
|
Loading…
Add table
Add a link
Reference in a new issue