From 4978e07edba59a7f9482c64408357f59eab44358 Mon Sep 17 00:00:00 2001 From: Pankaj Date: Thu, 1 Aug 2024 02:11:54 +0530 Subject: [PATCH] Adjust host --- dev/Dockerfile.postgres_profile_docker_k8s | 2 +- scripts/test/kubernetes-setup.sh | 2 +- scripts/test/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/Dockerfile.postgres_profile_docker_k8s b/dev/Dockerfile.postgres_profile_docker_k8s index e7af7cfc2..3a718b7e7 100644 --- a/dev/Dockerfile.postgres_profile_docker_k8s +++ b/dev/Dockerfile.postgres_profile_docker_k8s @@ -3,7 +3,7 @@ FROM python:3.9 RUN pip install dbt-postgres==1.3.1 psycopg2==2.9.3 pytz ENV POSTGRES_DATABASE=postgres -ENV POSTGRES_HOST=postgres-postgresql.default.svc.cluster.local +ENV POSTGRES_HOST=127.0.0.1 ENV POSTGRES_PASSWORD= ENV POSTGRES_PORT=5432 ENV POSTGRES_SCHEMA=public diff --git a/scripts/test/kubernetes-setup.sh b/scripts/test/kubernetes-setup.sh index a53313db3..7dffb26cb 100644 --- a/scripts/test/kubernetes-setup.sh +++ b/scripts/test/kubernetes-setup.sh @@ -51,7 +51,7 @@ export POSTGRES_PASSWORD # 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 +kubectl create secret generic postgres-secrets --from-literal=host=127.0.0.1 --from-literal=password=$POSTGRES_PASSWORD # Create a docker image containing the dbt project files and dbt profile cd dev && docker build -t dbt-jaffle-shop:1.0.0 -f Dockerfile.postgres_profile_docker_k8s . diff --git a/scripts/test/values.yaml b/scripts/test/values.yaml index 6ef26b4aa..495760f34 100644 --- a/scripts/test/values.yaml +++ b/scripts/test/values.yaml @@ -4,7 +4,7 @@ postgresql: command: - /bin/sh - -c - - exec pg_isready -U "postgres" -h postgres-postgresql.default.svc.cluster.local -p 5432 + - exec pg_isready -U "postgres" -h 127.0.0.1 -p 5432 initialDelaySeconds: 120 timeoutSeconds: 120 periodSeconds: 120