Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
bcc74dda29
|
|||
291fec96d1
|
@ -14,7 +14,7 @@ DEPLOYMENT_DIR=$PWD/deployment
|
||||
INSTANCES_DIR=$DEPLOYMENT_DIR/instances
|
||||
|
||||
|
||||
for NAMESPACE_DIR in `find $INSTANCES_DIR -type d -depth 1`; do
|
||||
for NAMESPACE_DIR in `find $INSTANCES_DIR -type d -mindepth 1 -maxdepth 1`; do
|
||||
NAMESPACE=`basename $NAMESPACE_DIR`
|
||||
echo "Namespace: $NAMESPACE"
|
||||
|
||||
@ -24,7 +24,7 @@ for NAMESPACE_DIR in `find $INSTANCES_DIR -type d -depth 1`; do
|
||||
kubectl -f - apply
|
||||
|
||||
pushd $NAMESPACE_DIR > /dev/null
|
||||
for INSTANCE_DIR in `find . -type d -depth 1`; do
|
||||
for INSTANCE_DIR in `find . -type d -mindepth 1 -maxdepth 1`; do
|
||||
pushd $INSTANCE_DIR > /dev/null
|
||||
INSTANCE=`basename $INSTANCE_DIR`
|
||||
echo "Instance: $INSTANCE"
|
||||
@ -44,13 +44,13 @@ for NAMESPACE_DIR in `find $INSTANCES_DIR -type d -depth 1`; do
|
||||
|
||||
# set database configuration as secret
|
||||
## prepare configuration to access database to set udi database password
|
||||
PGUSER=`kubectl get secret -n database timescaledb -o jsonpath="{.data.superuser-username}" | base64 --decode`
|
||||
PGUSER=`kubectl get secret -n database timescaledb -o jsonpath="{.data.superuser-username}" | base64 -d`
|
||||
PGHOST=`kubectl get services traefik -n system -o jsonpath="{.status.loadBalancer.ingress[0].ip}"`
|
||||
PGPASSWORD=`kubectl get secret -n database timescaledb -o jsonpath="{.data.superuser-password}" | base64 --decode`
|
||||
PGPASSWORD=`kubectl get secret -n database timescaledb -o jsonpath="{.data.superuser-password}" | base64 -d`
|
||||
PGSSLMODE=require
|
||||
|
||||
NEW_UDI_DB_LOGIN="udi""-""$NAMESPACE""-""$INSTANCE"
|
||||
NEW_UDI_DB_PASSWORD=`openssl rand -base64 32`
|
||||
NEW_UDI_DB_PASSWORD=`tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 32`
|
||||
NEW_UDI_DB_DATABASE="udi""-""$NAMESPACE""-""$INSTANCE"
|
||||
NEW_UDI_DB_HOST=timescaledb.database.svc.cluster.local
|
||||
|
||||
|
Reference in New Issue
Block a user