diff --git a/deploy-db.sh b/deploy-db.sh index b679da1..09c81bb 100755 --- a/deploy-db.sh +++ b/deploy-db.sh @@ -10,8 +10,7 @@ PVC_NAME="postgres-data" # Generate a secure random password if secret doesn't exist yet if ! kubectl get secret "$SECRET_NAME" -n "$NAMESPACE" >/dev/null 2>&1; then echo "==> Generating database password ..." - PASSWORD=*** 75d7 | base64 | head -c 32 | tr -d ' -' + PASSWORD=$(openssl rand -base64 32 | tr -d '\n') DATABASE_URL="postgres://lahuasca:$PASSWORD@postgres.$NAMESPACE.svc.cluster.local:5432/lahuasca" kubectl create secret generic "$SECRET_NAME" \