Airflow requires a metadata database for storing e.g. DAG, task and job data. The actual connection string is calculated by the operator so that the user does not need to remember the exact structure.
spec:
clusterConfig:
metadataDatabase:
postgresql: # (1)
host: airflow-postgresql
database: airflow
credentialsSecretName: airflow-postgresql-credentials # (2)-
A reference to one of the supported database backends (e.g.
postgresql). -
A reference to a Secret which must contain the two fields
usernameandpassword.
The queue/broker metadata and URL is only needed when running the celery executor.
The celeryResultsBackend definition uses the same structure as metadataDatabase shown above.
The celeryBroker definition requires Redis connection details.
spec:
clusterConfig:
celeryResultsBackend:
postgresql: # (1)
host: airflow-postgresql
database: airflow
credentialsSecretName: airflow-postgresql-credentials # (2)
celeryBroker:
redis: # (3)
host: airflow-redis-master
credentialsSecretName: airflow-redis-credentials # (2)
celeryExecutors:
roleGroups:
default:
replicas: 1-
A reference to one of the supported database backends (e.g.
postgresql). -
A reference to a secret which must contain the two fields
usernameandpassword. -
A reference to one of the supported queue brokers (e.g.
redis).
Alternatively, these connections can also be defined in full in a referenced secret:
spec:
clusterConfig:
metadataDatabase:
generic:
connectionUrlSecretName: postgresql-metadata # (1)spec:
clusterConfig:
celeryResultsBackend:
generic:
connectionUrlSecretName: postgresql-celery # (2)
celeryBroker:
generic:
connectionUrlSecretName: redis-celery # (3)-
A reference to a secret which must contain the single fields
connectionUrle.g.postgresql+psycopg2://airflow:airflow@airflow-postgresql/airflow -
A reference to a secret which must contain the single fields
connectionUrle.g.db+postgresql://airflow:airflow@airflow-postgresql/airflow -
A reference to a secret which must contain the single fields
connectionUrle.g.redis://:redis@airflow-redis-master:6379/0