|
15 | 15 | "template": "mariadb-persistent-template"
|
16 | 16 | },
|
17 | 17 | "objects": [
|
| 18 | + { |
| 19 | + "kind": "Secret", |
| 20 | + "apiVersion": "v1", |
| 21 | + "metadata": { |
| 22 | + "name": "${DATABASE_SERVICE_NAME}" |
| 23 | + }, |
| 24 | + "stringData" : { |
| 25 | + "databaseUser" : "${MYSQL_USER}", |
| 26 | + "databasePassword" : "${MYSQL_PASSWORD}", |
| 27 | + "databaseRootPassword" : "${MYSQL_ROOT_PASSWORD}" |
| 28 | + } |
| 29 | + }, |
18 | 30 | {
|
19 | 31 | "kind": "Service",
|
20 | 32 | "apiVersion": "v1",
|
|
100 | 112 | "env": [
|
101 | 113 | {
|
102 | 114 | "name": "MYSQL_USER",
|
103 |
| - "value": "${MYSQL_USER}" |
| 115 | + "valueFrom": { |
| 116 | + "secretKeyRef" : { |
| 117 | + "name" : "${DATABASE_SERVICE_NAME}", |
| 118 | + "key" : "databaseUser" |
| 119 | + } |
| 120 | + } |
104 | 121 | },
|
105 | 122 | {
|
106 | 123 | "name": "MYSQL_PASSWORD",
|
107 |
| - "value": "${MYSQL_PASSWORD}" |
| 124 | + "valueFrom": { |
| 125 | + "secretKeyRef" : { |
| 126 | + "name" : "${DATABASE_SERVICE_NAME}", |
| 127 | + "key" : "databasePassword" |
| 128 | + } |
| 129 | + } |
| 130 | + }, |
| 131 | + { |
| 132 | + "name": "MYSQL_ROOT_PASSWORD", |
| 133 | + "valueFrom": { |
| 134 | + "secretKeyRef" : { |
| 135 | + "name" : "${DATABASE_SERVICE_NAME}", |
| 136 | + "key" : "databaseRootPassword" |
| 137 | + } |
| 138 | + } |
108 | 139 | },
|
109 | 140 | {
|
110 | 141 | "name": "MYSQL_DATABASE",
|
|
175 | 206 | "from": "[a-zA-Z0-9]{16}",
|
176 | 207 | "required": true
|
177 | 208 | },
|
| 209 | + { |
| 210 | + "name": "MYSQL_ROOT_PASSWORD", |
| 211 | + "displayName": "MariaDB root Password", |
| 212 | + "description": "Password for the MariaDB root user.", |
| 213 | + "generate": "expression", |
| 214 | + "from": "[a-zA-Z0-9]{16}", |
| 215 | + "required": true |
| 216 | + }, |
178 | 217 | {
|
179 | 218 | "name": "MYSQL_DATABASE",
|
180 | 219 | "displayName": "MariaDB Database Name",
|
|
0 commit comments