From b404821d54bcefcd574621d552570db00147609e Mon Sep 17 00:00:00 2001 From: Pankaj Date: Mon, 12 Aug 2024 19:50:21 +0530 Subject: [PATCH] Add sleep before port forward --- scripts/test/kubernetes-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/test/kubernetes-setup.sh b/scripts/test/kubernetes-setup.sh index 248ecb2ac..5c6a7e447 100644 --- a/scripts/test/kubernetes-setup.sh +++ b/scripts/test/kubernetes-setup.sh @@ -53,16 +53,16 @@ helm install postgres bitnami/postgresql # -f scripts/test/values.yaml POSTGRES_PASSWORD=$(kubectl get secret --namespace default postgres-postgresql -o jsonpath="{.data.postgres-password}" | base64 -d) export POSTGRES_PASSWORD +kubectl create secret generic postgres-secrets --from-literal=host=postgres-postgresql.default.svc.cluster.local --from-literal=password=$POSTGRES_PASSWORD + +sleep 120 # Expose the Postgres to the host running Docker/Kind #kubectl port-forward --namespace default postgres-postgresql-0 5432:5432 & kubectl port-forward --namespace default svc/postgres-postgresql 5432:5432 & -kubectl create secret generic postgres-secrets --from-literal=host=postgres-postgresql.default.svc.cluster.local --from-literal=password=$POSTGRES_PASSWORD - #wait_for_nodes_ready # ## Wait for the kind cluster to be in 'Ready' state #wait_for_nodes_ready -sleep 120 # For Debugging echo "nodes"