Skip to content

feat: Airflow Listener integration #604

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

Merged
merged 51 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5033d79
mount listener volumes for relevant roles, type depending on listener…
adwk67 Apr 3, 2025
3bbe747
merge main
adwk67 Apr 4, 2025
7e8456a
add podrefs to write webserver endpoint to configmap
adwk67 Apr 7, 2025
7d67a6b
moved listener-class to webserver role
adwk67 Apr 8, 2025
f4c6fd7
Merge branch 'main' into feat/integrate-listener-operator
adwk67 Apr 8, 2025
6c2e2b3
move config map creation out of role-loop
adwk67 Apr 9, 2025
56dc940
Merge branch 'main' into feat/integrate-listener-operator
adwk67 Apr 9, 2025
f250059
merge conflicts
adwk67 Apr 9, 2025
48ae7e3
Merge branch 'main' into feat/integrate-listener-operator
adwk67 Apr 9, 2025
b6b969e
regenerate nix
adwk67 Apr 9, 2025
5e7b41b
assign listener-class to all roles and consider all ports
adwk67 Apr 9, 2025
8706a3e
fixed podref name for workers
adwk67 Apr 9, 2025
07efc9f
added integration test
adwk67 Apr 10, 2025
87a1295
changelog
adwk67 Apr 10, 2025
e646700
added docs
adwk67 Apr 10, 2025
77bcb82
Merge branch 'main' into feat/integrate-listener-operator
adwk67 Apr 10, 2025
64175f3
Update rust/operator-binary/src/crd/mod.rs
adwk67 Apr 16, 2025
7837af3
Update rust/operator-binary/src/crd/mod.rs
adwk67 Apr 16, 2025
6b359d1
Update rust/operator-binary/src/crd/mod.rs
adwk67 Apr 16, 2025
ebe8079
Update rust/operator-binary/src/crd/mod.rs
adwk67 Apr 16, 2025
acbca3e
corrected callout comments and regenerate charts
adwk67 Apr 16, 2025
8270343
Merge branch 'main' into feat/integrate-listener-operator
adwk67 Apr 16, 2025
8ae3303
use ephemeral listeners classes; fix test missing dimension
adwk67 Apr 17, 2025
f4ecd43
allow config map endpoints to be removed if cluster is stopped
adwk67 Apr 22, 2025
5c7022c
review feedback
adwk67 Apr 22, 2025
1003da2
check for port lower-bound
adwk67 Apr 22, 2025
8f0e539
Merge branch 'main' into feat/integrate-listener-operator
adwk67 Apr 22, 2025
dc803f4
reworked to only offer listener for webserver role
adwk67 Apr 24, 2025
a4ec801
reworked docs
adwk67 Apr 24, 2025
8beab3e
merge main
adwk67 Apr 24, 2025
063bded
Update docs/modules/airflow/pages/usage-guide/listenerclass.adoc
adwk67 Apr 24, 2025
25ce160
Update rust/operator-binary/src/crd/mod.rs
adwk67 Apr 24, 2025
0095ad9
added service check to test
adwk67 Apr 25, 2025
7da421c
correctly flatten WebserverConfig
adwk67 Apr 25, 2025
7ac6077
use pvcs for externally reachable endpoints
adwk67 Apr 25, 2025
0f650d3
use group listener for webservers
adwk67 Apr 28, 2025
7dcff05
Merge branch 'main' into feat/integrate-listener-operator
adwk67 Apr 28, 2025
dcc21f9
replace enum with string; use consistent webserver address for all li…
adwk67 Apr 28, 2025
3d2f3e0
removed unused test account
adwk67 Apr 28, 2025
95597e3
Update docs/modules/airflow/pages/usage-guide/listenerclass.adoc
adwk67 Apr 29, 2025
06e44af
Update tests/templates/kuttl/opa/41_check-authorization.py
adwk67 Apr 29, 2025
2a6313e
Update tests/templates/kuttl/oidc/login.py
adwk67 Apr 29, 2025
f9c41bc
review feedback: tests
adwk67 Apr 29, 2025
cb85a6a
review feedback: remove metrics port and re-work conditions
adwk67 Apr 29, 2025
57e1644
use custom listeners to stay independent of future changes to standar…
adwk67 Apr 29, 2025
ea88ae4
make custom listener classes namespace-specific
adwk67 Apr 29, 2025
f0b5b30
changes as per decision 51
adwk67 May 6, 2025
0cdd328
Merge branch 'main' into feat/integrate-listener-operator
adwk67 May 6, 2025
02cc5c7
fixed tests
adwk67 May 6, 2025
ccfd545
Merge branch 'main' into feat/integrate-listener-operator
adwk67 May 6, 2025
8bfaafb
Merge branch 'main' into feat/integrate-listener-operator
adwk67 May 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added

- Added listener support for Airflow ([#604]).
- Adds new telemetry CLI arguments and environment variables ([#613]).
- Use `--file-log-max-files` (or `FILE_LOG_MAX_FILES`) to limit the number of log files kept.
- Use `--file-log-rotation-period` (or `FILE_LOG_ROTATION_PERIOD`) to configure the frequency of rotation.
Expand All @@ -27,6 +28,7 @@

[#600]: https://github.com/stackabletech/airflow-operator/pull/600
[#601]: https://github.com/stackabletech/airflow-operator/pull/601
[#604]: https://github.com/stackabletech/airflow-operator/pull/604
[#607]: https://github.com/stackabletech/airflow-operator/pull/607
[#608]: https://github.com/stackabletech/airflow-operator/pull/608
[#613]: https://github.com/stackabletech/airflow-operator/pull/613
Expand Down
25 changes: 8 additions & 17 deletions deploy/helm/airflow-operator/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -584,23 +584,6 @@ spec:
default: false
description: for internal use only - not for production use.
type: boolean
listenerClass:
default: cluster-internal
description: |-
This field controls which type of Service the Operator creates for this AirflowCluster:

* cluster-internal: Use a ClusterIP service

* external-unstable: Use a NodePort service

* external-stable: Use a LoadBalancer service

This is a temporary solution with the goal to keep yaml manifests forward compatible. In the future, this setting will control which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change.
enum:
- cluster-internal
- external-unstable
- external-stable
type: string
loadExamples:
default: false
description: Whether to load example DAGs or not; defaults to false. The examples are used in the [getting started guide](https://docs.stackable.tech/home/nightly/airflow/getting_started/).
Expand Down Expand Up @@ -1338,6 +1321,10 @@ spec:
description: Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose the webserver.
nullable: true
type: string
logging:
default:
containers: {}
Expand Down Expand Up @@ -1555,6 +1542,10 @@ spec:
description: Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose the webserver.
nullable: true
type: string
logging:
default:
containers: {}
Expand Down
11 changes: 11 additions & 0 deletions deploy/helm/airflow-operator/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ rules:
- customresourcedefinitions
verbs:
- get
- apiGroups:
- listeners.stackable.tech
resources:
- listeners
verbs:
- get
- list
- watch
- patch
- create
- delete
- apiGroups:
- {{ include "operator.name" . }}.stackable.tech
resources:
Expand Down
21 changes: 11 additions & 10 deletions docs/modules/airflow/pages/usage-guide/listenerclass.adoc
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
= Service exposition with ListenerClasses
:description: Configure Airflow service exposure with ListenerClasses: cluster-internal, external-unstable, or external-stable.

Airflow offers a web UI and an API, both are exposed by the webserver process under the `webserver` role.
The Operator deploys a service called `<name>-webserver` (where `<name>` is the name of the AirflowCluster) through which Airflow can be reached.

This service can have three different types: `cluster-internal`, `external-unstable` and `external-stable`.
Read more about the types in the xref:concepts:service-exposition.adoc[service exposition] documentation at platform level.

This is how the listener class is configured:
The operator deploys a xref:listener-operator:listener.adoc[Listener] for the Webserver pod.
The listener defaults to only being accessible from within the Kubernetes cluster, but this can be changed by setting `.spec.webservers.config.listenerClass`:

[source,yaml]
----
spec:
clusterConfig:
listenerClass: cluster-internal # <1>
webservers:
config:
listenerClass: external-unstable # <1>
schedulers:
...
celeryExecutors:
...
----
<1> The default `cluster-internal` setting.
<1> Specify a ListenerClass, such as `external-stable`, `external-unstable`, or `cluster-internal` (the default setting is `cluster-internal`).
This can be set only for the webservers role.
6 changes: 3 additions & 3 deletions nix/sources.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading