Skip to content

Commit

Permalink
Service exposition docs (#320)
Browse files Browse the repository at this point in the history
* added document

* Updated docs

* Added the external-unstable class to the getting started guide

* Updated docs

* ...

* regenerate charts
  • Loading branch information
fhennig authored Aug 31, 2023
1 parent 8164085 commit 0f6feff
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 37 deletions.
4 changes: 3 additions & 1 deletion deploy/helm/airflow-operator/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7023,13 +7023,15 @@ spec:
listenerClass:
default: cluster-internal
description: |-
In the future this setting will control, which ListenerClass <https://docs.stackable.tech/home/stable/listener-operator/listenerclass.html> will be used to expose the service. Currently only a subset of the ListenerClasses are supported by choosing the type of the created Services by looking at the ListenerClass name specified, In a future release support for custom ListenerClasses will be introduced without a breaking change:
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/stable/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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ spec:
clusterConfig:
loadExamples: true
exposeConfig: false
listenerClass: external-unstable
credentialsSecret: simple-airflow-credentials
webservers:
roleGroups:
Expand Down
31 changes: 0 additions & 31 deletions docs/modules/airflow/examples/getting_started/code/airflow.yaml.j2

This file was deleted.

15 changes: 15 additions & 0 deletions docs/modules/airflow/pages/usage-guide/listenerclass.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
= Service exposition with ListenerClasses

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:

[source,yaml]
----
spec:
clusterConfig:
listenerClass: cluster-internal # <1>
----
<1> The default `cluster-internal` setting.
1 change: 1 addition & 0 deletions docs/modules/airflow/partials/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
** xref:airflow:usage-guide/pod-placement.adoc[]
** xref:airflow:usage-guide/mounting-dags.adoc[]
** xref:airflow:usage-guide/applying-custom-resources.adoc[]
** xref:airflow:usage-guide/listenerclass.adoc[]
** xref:airflow:usage-guide/storage-resources.adoc[]
** xref:airflow:usage-guide/security.adoc[]
** xref:airflow:usage-guide/logging.adoc[]
Expand Down
10 changes: 5 additions & 5 deletions rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,17 @@ pub struct AirflowClusterConfig {
pub expose_config: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub load_examples: Option<bool>,
/// In the future this setting will control, which ListenerClass <https://docs.stackable.tech/home/stable/listener-operator/listenerclass.html>
/// will be used to expose the service.
/// Currently only a subset of the ListenerClasses are supported by choosing the type of the created Services
/// by looking at the ListenerClass name specified,
/// In a future release support for custom ListenerClasses will be introduced without a breaking change:
/// 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/stable/listener-operator/listenerclass.html>
/// will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change.
#[serde(default)]
pub listener_class: CurrentlySupportedListenerClasses,
/// Name of the Vector aggregator discovery ConfigMap.
Expand Down

0 comments on commit 0f6feff

Please sign in to comment.