Testing db connection only when deploying embedded db

This commit is contained in:
Timothy Clarke
2017-12-07 11:42:26 +00:00
parent 29d0f8af1a
commit b6b26f4381
3 changed files with 3 additions and 11 deletions
+1 -2
View File
@@ -63,12 +63,11 @@ The following tables lists the configurable parameters of the WordPress chart an
| `smtpUsername` | User name for SMTP emails | `nil` |
| `smtpProtocol` | SMTP protocol [`tls`, `ssl`] | `nil` |
| `mariadb.enabled` | Deploy MariaDB container(s) | `true` |
| `mariadb.mariadbHostname` | MariaDB Hostname if deployMariadb is false | `nil` |
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
| `mariadb.mariadbDatabase` | Database name to create | `bitnami_wordpress` |
| `mariadb.mariadbUser` | Database user to create | `bn_wordpress` |
| `mariadb.mariadbPassword` | Password for the database | _random 10 character long alphanumeric string_ |
| `externalDatabase.hostname` | Host of the external database | `localhost` |
| `externalDatabase.hostname` | Host of the external database | `localhost` |
| `externalDatabase.rootPassword` | DB Root users password (schema creation) | `nil` |
| `externalDatabase.username` | Existing username in the external db | `bn_wordpress` |
| `externalDatabase.password` | Password for the above username | `nil` |
@@ -1,3 +1,4 @@
{{- if .Values.mariadb.enabled }}
apiVersion: v1
kind: Pod
metadata:
@@ -10,11 +11,7 @@ spec:
image: {{ .Values.image }}
env:
- name: MARIADB_HOST
{{- if .Values.deployMariadb }}
value: {{ template "mariadb.fullname" . }}
{{- else }}
value: {{ default "" .Values.mariadb.mariadbHostname | quote }}
{{- end }}
- name: MARIADB_PORT
value: "3306"
- name: WORDPRESS_DATABASE_NAME
@@ -28,4 +25,4 @@ spec:
key: mariadb-password
command: ["sh", "-c", "mysql --host=$MARIADB_HOST --port=$MARIADB_PORT --user=$WORDPRESS_DATABASE_USER --password=$WORDPRESS_DATABASE_PASSWORD"]
restartPolicy: Never
{{- end }}
-4
View File
@@ -80,10 +80,6 @@ mariadb:
## If you want to use an external database set this to false and supply details to externalDatabase above
enabled: true
## MariaDB Hostname
## If you would prefer to use a preexisting database host setdeployMariadb to false and then enter the hostname below
# mariadbHostname:
## MariaDB admin password
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
##