Skip to content

Commit

Permalink
databse portforward to the end
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-nour-fdc committed Aug 27, 2024
1 parent 6d1b4bf commit 855e783
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 2 additions & 0 deletions tests/integration-tests/cluster-setup/argocd-kuberpult.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ print "connection to frontend service successful"
waitForDeployment "default" "app=kuberpult-rollout-service"
waitForDeployment "default" "app=kuberpult-manifest-repo-export-service"

portForwardAndWait "default" deploy/postgres "5432" "5432"

kubectl get deployment
kubectl get pods

Expand Down
16 changes: 0 additions & 16 deletions tests/integration-tests/cluster-setup/setup-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,6 @@ function waitForDeployment() {
done
}

function portForwardAndWait() {
ns="$1"
deployment="$2"
portHere="$3"
portThere="$4"
ports="$portHere:$portThere"
print "portForwardAndWait for $ns/$deployment $ports"
kubectl -n "$ns" port-forward "$deployment" "$ports" &
print "portForwardAndWait: waiting until the port forward works..."
until nc -vz localhost "$portHere"
do
sleep 1s
done
}

kubectl apply -f - <<EOF
---
apiVersion: v1
Expand Down Expand Up @@ -87,5 +72,4 @@ spec:
EOF

waitForDeployment default "app=postgres"
portForwardAndWait "default" deploy/postgres "5432" "5432"
echo "done setting up postgres"

0 comments on commit 855e783

Please sign in to comment.