-
-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Replace credentials-secret with db/broker connection(s) #743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 33 commits
11da381
032bf2f
e053806
06c6151
685f66b
d543b23
9ea139c
d210148
50a2c5c
751fb68
69ce878
965176e
173b6a2
93e3a8e
3c4e66d
07cca3d
f588994
784d5c8
e9fcbf4
b4847c0
ce50743
f690097
652a1bb
cf5ab70
fe3ac91
20f12e9
322a7c5
dbe5c94
1c04edc
6580b9c
5f916a6
3462855
b6cf1b2
6e94e7b
8f6f461
6430271
6c626d1
a462a97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| = Database connections | ||
| :description: Configure Airflow Database connectivity. | ||
|
|
||
| Airflow requires a metadata database for storing e.g. DAG, task and Job data. | ||
adwk67 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| The actual connection string is provided by the operator so that the user does not need to remember the exact structure. | ||
| The same database can be accessed using different drivers: this is also handled by the operator, since the context is known (e.g. job metadata vs. queued job metadata) when parsing the resource file. | ||
maltesander marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| == Typed connections | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| spec: | ||
| clusterConfig: | ||
| metadataDatabase: | ||
| postgresql: # <1> | ||
| host: airflow-postgresql | ||
| databaseName: airflow | ||
| credentialsSecret: postgresql-credentials # <2> | ||
| ---- | ||
| <1> A reference to one of the supported database backends (e.g. `postgresql`). | ||
| <2> A reference to a secret which must contain the two fields `username` and `password`. | ||
adwk67 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The queue/broker metadata and URL is only needed when running the celery executor. | ||
| The `celeryResultBackend` definition uses the same structure as `metadataDatabase` shown above. | ||
| The `celeryBrokerUrl` definition is similar but does not require a `databaseName`. | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| --- | ||
| spec: | ||
| celeryExecutors: | ||
| celeryResultBackend: | ||
| postgresql: # <1> | ||
| host: airflow-postgresql | ||
| databaseName: airflow | ||
| credentialsSecret: postgresql-credentials # <2> | ||
| celeryBrokerUrl: | ||
| redis: # <3> | ||
| host: airflow-redis-master | ||
| credentialsSecret: redis-credentials # <2> | ||
| ---- | ||
| <1> A reference to one of the supported database backends (e.g. `postgresql`). | ||
| <2> A reference to a secret which must contain the two fields `username` and `password`. | ||
| <3> A reference to one of the supported queue brokers (e.g. `redis`). | ||
|
|
||
| == Generic connections | ||
|
|
||
| Alternatively, these connections can also be defined in full in a referenced secret: | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| --- | ||
| spec: | ||
| clusterConfig: | ||
| metadataDatabase: | ||
| generic: | ||
| uriSecret: postgresql-metadata # <1> | ||
| ---- | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| --- | ||
| spec: | ||
| celeryResultBackend: | ||
| generic: | ||
| uriSecret: postgresql-celery # <2> | ||
| celeryBrokerUrl: | ||
| generic: | ||
| uriSecret: redis-celery # <3> | ||
| ---- | ||
|
|
||
| <1> A reference to a secret which must contain the single fields `uri` e.g. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel URI is very generic. I think
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No strong feelings - I just went with what we had in the decision.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same, @sbernauer any opinions? |
||
| `uri: postgresql+psycopg2://airflow:airflow@airflow-postgresql/airflow` | ||
| <2> A reference to a secret which must contain the single fields `uri` e.g. | ||
| `uri: db+postgresql://airflow:airflow@airflow-postgresql/airflow` | ||
| <3> A reference to a secret which must contain the single fields `uri` e.g. | ||
| `uri: redis://:redis@airflow-redis-master:6379/0` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ spec: | |
| "flask_appbuilder": | ||
| level: WARN | ||
| celeryExecutors: | ||
| ... | ||
| config: | ||
| logging: | ||
| enableVectorAgent: true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ spec: | |
| default: | ||
| replicas: 2 | ||
| celeryExecutors: | ||
| ... | ||
| config: | ||
| resources: | ||
| cpu: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.