Skip to content

Commit

Permalink
fix: use 127.0.0.1 in pgbouncer liveness probe
Browse files Browse the repository at this point in the history
Signed-off-by: Mathew Wicks <thesuperzapper@users.noreply.github.com>
  • Loading branch information
thesuperzapper committed Jun 21, 2022
1 parent 3514394 commit 5fba09f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion charts/airflow/templates/config/secret-config-envs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ data:
DATABASE_CELERY_CMD: {{ `echo -n "db+mysql://$(eval $DATABASE_USER_CMD):$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
{{- end }}

{{- if include "airflow.pgbouncer.should_use" . }}
## bash command which echos the DB connection string in `psql` cli format
DATABASE_PSQL_CMD: {{ `echo -n "postgresql://$(eval $DATABASE_USER_CMD):$(eval $DATABASE_PASSWORD_CMD)@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
## NOTE: uses `127.0.0.1` as the host because this is only used in the pgbouncer liveness probe
## and minikube does not allow pods to access their own `cluster.local` service so would otherwise fail
DATABASE_PSQL_CMD: {{ `echo -n "postgresql://$(eval $DATABASE_USER_CMD):$(eval $DATABASE_PASSWORD_CMD)@127.0.0.1:${DATABASE_PORT}/${DATABASE_DB}${DATABASE_PROPERTIES}"` | b64enc | quote }}
{{- end }}

## ================
## Redis Configs
Expand Down

0 comments on commit 5fba09f

Please sign in to comment.