added script for testing against kubernetes database

This commit is contained in:
Steffen Vogel 2019-11-13 18:13:28 +01:00
parent cbcf8abef7
commit 4c2437185e

10
k8s_test.sh Normal file
View file

@ -0,0 +1,10 @@
#!/bin/bash
kubectl -n services port-forward svc/postgres-postgresql 5432:5432 & PF=$!
POSTGRES_PASS=$(kubectl -n villas-demo get secret postgres-credentials -o json | jq -r .data.password | base64 -d)
go run start.go -dbhost localhost -dbname villas -dbuser villas -dbpass ${POSTGRES_PASS}
kill $PF
wait $PF