External database configuration (#225)
This patch makes all the database settings configurable. fixes: https://github.com/spiffe/helm-charts/issues/37 --------- Signed-off-by: Kevin Fox <[email protected]> Signed-off-by: kfox1111 <[email protected]> Co-authored-by: Faisal Memon <[email protected]> Co-authored-by: Marco Franssen <[email protected]>
This commit is contained in:
co-authored by
Faisal Memon
Marco Franssen
parent
ce78bea121
commit
d3da3eed55
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -xe
|
||||
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||
|
||||
DB=spire
|
||||
DBUSER=spire
|
||||
DBPW=$(uuidgen)
|
||||
DBROOTPW=$(uuidgen)
|
||||
|
||||
# Generate random settings to make sure things come up with random settings.
|
||||
cat <<EOF > /tmp/$$-db-values.yaml
|
||||
auth:
|
||||
database: ${DB}
|
||||
username: ${DBUSER}
|
||||
password: ${DBPW}
|
||||
rootPassword: ${DBROOTPW}
|
||||
EOF
|
||||
|
||||
cat <<EOF > /tmp/$$-spire-values.yaml
|
||||
spire-server:
|
||||
dataStore:
|
||||
sql:
|
||||
databaseType: mysql
|
||||
databaseName: ${DB}
|
||||
username: ${DBUSER}
|
||||
password: ${DBPW}
|
||||
host: mysql
|
||||
port: 3306
|
||||
options:
|
||||
- parseTime: true
|
||||
EOF
|
||||
|
||||
helm install mysql mysql --namespace "spire-server" --version "$VERSION_MYSQL" --repo "$HELM_REPO_MYSQL" \
|
||||
--values "${SCRIPTPATH}/mysql-values.yaml" \
|
||||
--values /tmp/$$-db-values.yaml --wait
|
||||
|
||||
helm install \
|
||||
--namespace "spire-server" \
|
||||
--values /tmp/$$-spire-values.yaml \
|
||||
--values "${SCRIPTPATH}/../../../examples/production/values.yaml" \
|
||||
spire charts/spire --wait
|
||||
|
||||
helm test spire --namespace "spire-server"
|
||||
Reference in New Issue
Block a user