diff --git a/charts/airflow/templates/config/secret-config-envs.yaml b/charts/airflow/templates/config/secret-config-envs.yaml index 54258dc4..5a7bbc05 100644 --- a/charts/airflow/templates/config/secret-config-envs.yaml +++ b/charts/airflow/templates/config/secret-config-envs.yaml @@ -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