FIX entrypoint.sh preventing regular and legitimate use-cases #495
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my opinion, the behaviour of the project should be to help people start with an easy-to-use compose file, and then, allow advanced configuration by letting the user provide
AIRFLOW__
variables to the containers.Typically, that would be done using a configmap in Kubernetes (one configmap allowing to configure several containers in the pod). And in fact, that's what is documented in the stable Airflow Helm chart:
https://github.com/helm/charts/tree/master/stable/airflow
But currently the containers entrypoint.sh script overrides three important variables even when the user provides them:
AIRFLOW__CORE__SQL_ALCHEMY_CONN
,AIRFLOW__CELERY__BROKER_URL
andAIRFLOW__CELERY__RESULT_BACKEND
...--
This commit fixes the entrypoint.sh script in order to comply to the user provided
configurations. If they provided
AIRFLOW__
environment variables, theentrypoint.sh
must not override them.
It also adds a new PostgreSQL configuration variable
POSTGRES_EXTRAS
in order to enableTLS encryption. See the Airflow documentation "PostgreSQL Connection" about this.
It also adds two new Redis configuration variables
REDIS_PROTO
which was previously hardcodedto
redis://
(in order to prepare the possible use ofrediss://
), andREDIS_DBNUM
which waspreviously hardcoded to
1
(that prevents any use of a mutual broker between Airflow instances).It also adds the corresponding documentation about PostgreSQL and Redis variables.