Change production example to be an integration test (#237)

* Change production example to be an integration test

The documentation is a better example then the test now. Separate the
two.

Signed-off-by: Kevin Fox <[email protected]>

* Fix job name reference

Signed-off-by: Kevin Fox <[email protected]>

* Fix job name reference

Signed-off-by: Kevin Fox <[email protected]>

* Update postgresql example

Signed-off-by: Kevin Fox <[email protected]>

* Update mysql example

Signed-off-by: Kevin Fox <[email protected]>

* Update nested and mysql

Signed-off-by: Kevin Fox <[email protected]>

* Fix typo

Signed-off-by: Kevin Fox <[email protected]>

* Add support for integration tests in the tests/integration dir

Signed-off-by: Kevin Fox <[email protected]>

* Fix split issue and typo

Signed-off-by: Kevin Fox <[email protected]>

* Fix split issue

Signed-off-by: Kevin Fox <[email protected]>

* Try folding example your values into bash so that its not laying around in an fs for a user to accidently use.

Signed-off-by: Kevin Fox <[email protected]>

* Fix test

Signed-off-by: Kevin Fox <[email protected]>

* Fix test

Signed-off-by: Kevin Fox <[email protected]>

* Fix test

Signed-off-by: Kevin Fox <[email protected]>

* Fix test

Signed-off-by: Kevin Fox <[email protected]>

* Fix test

Signed-off-by: Kevin Fox <[email protected]>

* Fix test

Signed-off-by: Kevin Fox <[email protected]>

* Cleanup

Signed-off-by: Kevin Fox <[email protected]>

---------

Signed-off-by: Kevin Fox <[email protected]>
Signed-off-by: kfox1111 <[email protected]>
Co-authored-by: Faisal Memon <[email protected]>
This commit is contained in:
kfox1111
2024-03-20 14:12:48 -07:00
committed by GitHub
co-authored by Faisal Memon
parent 72768ecdbc
commit 993ee8582b
16 changed files with 36 additions and 114 deletions
+4 -6
View File
@@ -10,14 +10,12 @@ If manually deploying for testing, you can safely put the password into an envir
source ../bin/readpw.sh
```
Next, edit values.yaml with your settings. Check it into your git repo if using one.
Follow the instructions as described at https://artifacthub.io/packages/helm/spiffe/spire, and copy in the settings from
examples/external-postgresql/values.yaml into your values file.
Then, deploy the chart pointing at your postgresql instance like so:
You can add the password at install runtime like so:
```shell
helm upgrade --install --namespace spire-server spire charts/spire -f examples/external-postgresql/values.yaml --set "spire-server.dataStore.sql.password=${DBPW}"
helm upgrade --install --namespace spire-mgmt spire spire -f your-values.yaml --set "spire-server.dataStore.sql.password=${DBPW}" --repo https://spiffe.github.io/helm-charts-hardened/
```
See the [production example](../production) for production recommendations.
See [values.yaml](./values.yaml) for more details on the chart configurations to achieve this setup.
+2 -2
View File
@@ -50,10 +50,10 @@ kubectl label namespace spire-server pod-security.kubernetes.io/enforce=restrict
helm upgrade --install postgresql postgresql --version "$VERSION_POSTGRESQL" --repo "$HELM_REPO_POSTGRESQL" \
--namespace spire-server \
--values "${DEPS}/postgresql.yaml,${SCRIPTPATH}/../production/values.yaml,${SCRIPTPATH}/../production/values-node-pod-antiaffinity.yaml" \
--values "${DEPS}/postgresql.yaml" \
--wait
helm upgrade --install --namespace "spire-server" \
--values "${SCRIPTPATH}/values.yaml,${SCRIPTPATH}/../production/values.yaml,${SCRIPTPATH}/../production/values-node-pod-antiaffinity.yaml,${SCRIPTPATH}/../production/example-your-values.yaml" \
--values "${COMMON_TEST_YOUR_VALUES},${SCRIPTPATH}/values.yaml,${SCRIPTPATH}/../misc/values-node-pod-antiaffinity.yaml" \
--set 'spire-server.dataStore.sql.password=sp1ff3Test' --wait spire charts/spire
helm test --namespace "spire-server" spire