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
@@ -0,0 +1,3 @@
|
||||
# shellcheck shell=bash disable=SC2034
|
||||
read -s -r -p "Please enter your database password: " DBPW
|
||||
echo
|
||||
@@ -0,0 +1,22 @@
|
||||
# Example external mysql
|
||||
|
||||
We recommend you put your config into git, but never put a password directly into git. Generally the easiest way to do so is via
|
||||
environment variable. Your CI/CD system of choice usually allows you to set those. Please refer to your systems documentation for
|
||||
guidance.
|
||||
|
||||
If manually deploying for testing, you can safely put the password into an environment variable by running:
|
||||
|
||||
```bash
|
||||
source ../bin/readpw.sh
|
||||
```
|
||||
|
||||
Next, edit values.yaml with your settings. Check it into your git repo if using one.
|
||||
|
||||
Then, deploy the chart pointing at your mysql instance like so:
|
||||
|
||||
```shell
|
||||
helm upgrade --install --namespace spire-server spire charts/spire -f values.yaml --set "spire-server.dataStore.sql.password=${DBPW}"
|
||||
```
|
||||
|
||||
See the [production example](../production) for production recommendations.
|
||||
See [values.yaml](./values.yaml) for more details on the chart configurations to achieve this setup.
|
||||
@@ -0,0 +1,10 @@
|
||||
spire-server:
|
||||
dataStore:
|
||||
sql:
|
||||
databaseType: mysql
|
||||
databaseName: spire
|
||||
host: mysql
|
||||
port: 3306
|
||||
username: spire
|
||||
options:
|
||||
- parseTime: true
|
||||
@@ -0,0 +1,23 @@
|
||||
# Example external postgresql
|
||||
|
||||
We recommend you put your config into git, but never put a password directly into git. Generally the easiest way to do so is via
|
||||
environment variable. Your CI/CD system of choice usually allows you to set those. Please refer to your systems documentation for
|
||||
guidance.
|
||||
|
||||
If manually deploying for testing, you can safely put the password into an environment variable by running:
|
||||
|
||||
```bash
|
||||
source ../bin/readpw.sh
|
||||
```
|
||||
|
||||
Next, edit values.yaml with your settings. Check it into your git repo if using one.
|
||||
|
||||
Then, deploy the chart pointing at your postgresql instance like so:
|
||||
|
||||
```shell
|
||||
helm upgrade --install --namespace spire-server spire charts/spire -f values.yaml --set "spire-server.dataStore.sql.password=${DBPW}"
|
||||
|
||||
```
|
||||
|
||||
See the [production example](../production) for production recommendations.
|
||||
See [values.yaml](./values.yaml) for more details on the chart configurations to achieve this setup.
|
||||
@@ -0,0 +1,10 @@
|
||||
spire-server:
|
||||
dataStore:
|
||||
sql:
|
||||
databaseType: postgres
|
||||
databaseName: spire
|
||||
host: postgresql
|
||||
port: 5432
|
||||
username: spire
|
||||
options:
|
||||
- sslmode: disable
|
||||
Reference in New Issue
Block a user