Skip to content

Commit

Permalink
Fix values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro committed Aug 1, 2024
1 parent 639e19c commit f9c9d4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dev/Dockerfile.postgres_profile_docker_k8s
Original file line number Diff line number Diff line change
Expand Up @@ -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=127.0.0.1
ENV POSTGRES_HOST=postgres-postgresql.default.svc.cluster.local
ENV POSTGRES_PASSWORD=<postgres_password>
ENV POSTGRES_PORT=5432
ENV POSTGRES_SCHEMA=public
Expand Down
7 changes: 4 additions & 3 deletions scripts/test/kubernetes-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@ kubectl config set-context default
# Deploy a Postgres pod to Kind
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm upgrade --install postgres bitnami/postgresql -f scripts/test/values.yaml
helm install postgres bitnami/postgresql -f scripts/test/values.yaml

sleep 60

# Retrieve the Postgres password and set it as an environment variable
POSTGRES_PASSWORD=$(kubectl get secret --namespace default postgres-postgresql -o jsonpath="{.data.postgres-password}" | base64 -d)
export POSTGRES_PASSWORD

sleep 60
# 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=127.0.0.1 --from-literal=password=$POSTGRES_PASSWORD
kubectl create secret generic postgres-secrets --from-literal=host=postgres-postgresql.default.svc.cluster.local --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 .
Expand Down
9 changes: 2 additions & 7 deletions scripts/test/values.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
postgresql:
primary:
livenessProbe:
exec:
command:
- /bin/sh
- -c
- exec pg_isready -U "postgres" -h 127.0.0.1 -p 5432
initialDelaySeconds: 60
initialDelaySeconds: 120
timeoutSeconds: 5
periodSeconds: 10
successThreshold: 1

0 comments on commit f9c9d4e

Please sign in to comment.