Skip to content

Commit b91afae

Browse files
committed
added a doc
1 parent fc686f0 commit b91afae

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
= Database initialization
2+
:description: Configure Airflow DB start-up.
3+
4+
By default, Airflow will run database initialization routines (checking and/or creating the metadata schema and creating an admin user) on start-up.
5+
These are idempotent and can be run every time as the overhead is minimal.
6+
However, if these steps should be skipped, a running Airflow cluster can be patched with a resource like this to deactivate the initialization:
7+
8+
[source,yaml]
9+
----
10+
---
11+
apiVersion: airflow.stackable.tech/v1alpha1
12+
kind: AirflowCluster
13+
metadata:
14+
name: airflow
15+
spec:
16+
clusterConfig:
17+
dbInit: false # <1>
18+
----
19+
<1> Turn off the initialization routine by setting `dbInit` to `false`
20+
21+
NOTE: The field `dbInit` is `true` by default to be backwards-compatible.
22+
A fresh Airflow cluster cannot be created with this field set to `false` as this results in missing metadata in the Airflow database.

docs/modules/airflow/partials/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
** xref:airflow:getting_started/first_steps.adoc[]
44
* xref:airflow:required-external-components.adoc[]
55
* xref:airflow:usage-guide/index.adoc[]
6+
** xref:airflow:usage-guide/db-init.adoc[]
67
** xref:airflow:usage-guide/mounting-dags.adoc[]
78
** xref:airflow:usage-guide/applying-custom-resources.adoc[]
89
** xref:airflow:usage-guide/listenerclass.adoc[]

0 commit comments

Comments
 (0)