Skip to content

Commit 9fcc743

Browse files
authored
Consolidate ResultsBackend and Broker to clusterConfig (#786)
* fix: remove obsolete errors * chore: move results backend and broker to clusterConfig * chore: regenerate charts * fix: regenerate nix build * chore: move results backend and broker to cluster config in tests * docs: adapt docs and examples * test: adapt unit tests * fix: pre-commit * chore: adapted changelog * chore: add warning if broker and results backend configured without a celery executor.
1 parent 16f6693 commit 9fcc743

23 files changed

Lines changed: 480 additions & 468 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
This means you need to replace your simple database connection string with a typed struct.
2020
This struct is consistent between different CRDs, so that you can easily copy/paste it between stacklets.
2121
Read on the [Airflow database documentation](https://docs.stackable.tech/home/nightly/airflow/usage-guide/database-connections) for details ([#754]).
22+
- BREAKING: Renamed and moved the `celeryExecutor` broker and results backend to `clusterConfig` ([#786]).
23+
The results backend `spec.celeryExecutors.resultBackend` is now `spec.clusterConfig.celeryResultsBackend`.
24+
The broker `spec.celeryExecutors.broker` is now `spec.clusterConfig.celeryBroker`.
2225

2326
### Fixed
2427

@@ -33,6 +36,7 @@
3336
[#777]: https://github.com/stackabletech/airflow-operator/pull/777
3437
[#754]: https://github.com/stackabletech/airflow-operator/pull/754
3538
[#784]: https://github.com/stackabletech/airflow-operator/pull/784
39+
[#786]: https://github.com/stackabletech/airflow-operator/pull/786
3640

3741
## [26.3.0] - 2026-03-16
3842

Cargo.nix

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crate-hashes.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/modules/airflow/examples/example-airflow-incluster.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ spec:
1515
host: airflow-postgresql
1616
database: airflow
1717
credentialsSecretName: airflow-postgresql-credentials
18+
celeryResultsBackend:
19+
postgresql:
20+
host: airflow-postgresql
21+
database: airflow
22+
credentialsSecretName: airflow-postgresql-credentials
23+
celeryBroker:
24+
redis:
25+
host: airflow-redis-master
26+
credentialsSecretName: airflow-redis-credentials
1827
webservers:
1928
roleConfig:
2029
listenerClass: external-unstable
@@ -29,15 +38,6 @@ spec:
2938
envOverrides: *envOverrides
3039
replicas: 1
3140
celeryExecutors:
32-
resultBackend:
33-
postgresql:
34-
host: airflow-postgresql
35-
database: airflow
36-
credentialsSecretName: airflow-postgresql-credentials
37-
broker:
38-
redis:
39-
host: airflow-redis-master
40-
credentialsSecretName: airflow-redis-credentials
4141
roleGroups:
4242
default:
4343
envOverrides: *envOverrides

docs/modules/airflow/examples/getting_started/code/airflow.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ spec:
1616
host: airflow-postgresql
1717
database: airflow
1818
credentialsSecretName: airflow-postgresql-credentials
19-
webservers:
20-
roleConfig:
21-
listenerClass: external-unstable
22-
roleGroups:
23-
default:
24-
replicas: 1
25-
celeryExecutors:
26-
resultBackend:
19+
celeryResultsBackend:
2720
postgresql:
2821
host: airflow-postgresql
2922
database: airflow
3023
credentialsSecretName: airflow-postgresql-credentials
31-
broker:
24+
celeryBroker:
3225
redis:
3326
host: airflow-redis-master
3427
credentialsSecretName: airflow-redis-credentials
28+
webservers:
29+
roleConfig:
30+
listenerClass: external-unstable
31+
roleGroups:
32+
default:
33+
replicas: 1
34+
celeryExecutors:
3535
roleGroups:
3636
default:
3737
replicas: 1

docs/modules/airflow/pages/usage-guide/database-connections.adoc

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,26 @@ spec:
2020
<2> A reference to a Secret which must contain the two fields `username` and `password`.
2121

2222
The queue/broker metadata and URL is only needed when running the celery executor.
23-
The `resultBackend` definition uses the same structure as `metadataDatabase` shown above.
24-
The `broker` definition requires Redis connection details.
23+
The `celeryResultsBackend` definition uses the same structure as `metadataDatabase` shown above.
24+
The `celeryBroker` definition requires Redis connection details.
2525

2626
[source,yaml]
2727
----
2828
spec:
29-
celeryExecutors:
30-
resultBackend:
29+
clusterConfig:
30+
celeryResultsBackend:
3131
postgresql: # <1>
3232
host: airflow-postgresql
3333
database: airflow
3434
credentialsSecretName: airflow-postgresql-credentials # <2>
35-
broker:
35+
celeryBroker:
3636
redis: # <3>
3737
host: airflow-redis-master
3838
credentialsSecretName: airflow-redis-credentials # <2>
39+
celeryExecutors:
40+
roleGroups:
41+
default:
42+
replicas: 1
3943
----
4044
<1> A reference to one of the supported database backends (e.g. `postgresql`).
4145
<2> A reference to a secret which must contain the two fields `username` and `password`.
@@ -57,10 +61,11 @@ spec:
5761
[source,yaml]
5862
----
5963
spec:
60-
resultBackend:
64+
clusterConfig:
65+
celeryResultsBackend:
6166
generic:
6267
connectionUrlSecretName: postgresql-celery # <2>
63-
broker:
68+
celeryBroker:
6469
generic:
6570
connectionUrlSecretName: redis-celery # <3>
6671
----

0 commit comments

Comments
 (0)