From 48830127a2bdd46fb9721045ef2f783ad000e29b Mon Sep 17 00:00:00 2001 From: Felix Hennig Date: Thu, 21 Dec 2023 10:31:57 +0100 Subject: [PATCH 1/3] added reference stuff --- docs/modules/airflow/pages/configuration.adoc | 13 ------------- .../commandline-parameters.adoc} | 7 +++++-- docs/modules/airflow/pages/reference/crds.adoc | 3 +++ .../environment-variables.adoc} | 7 +++++-- docs/modules/airflow/pages/reference/index.adoc | 6 ++++++ docs/modules/airflow/partials/nav.adoc | 6 +++++- rust/crd/src/lib.rs | 5 +++++ 7 files changed, 29 insertions(+), 18 deletions(-) delete mode 100644 docs/modules/airflow/pages/configuration.adoc rename docs/modules/airflow/pages/{commandline_args.adoc => reference/commandline-parameters.adoc} (78%) create mode 100644 docs/modules/airflow/pages/reference/crds.adoc rename docs/modules/airflow/pages/{env_var_args.adoc => reference/environment-variables.adoc} (90%) create mode 100644 docs/modules/airflow/pages/reference/index.adoc diff --git a/docs/modules/airflow/pages/configuration.adoc b/docs/modules/airflow/pages/configuration.adoc deleted file mode 100644 index 65ff9ab4..00000000 --- a/docs/modules/airflow/pages/configuration.adoc +++ /dev/null @@ -1,13 +0,0 @@ -= Configuration - -== Command Line Parameters - -This operator accepts the following command line parameters: - -include::commandline_args.adoc[] - -== Environment variables - -This operator accepts the following environment variables: - -include::env_var_args.adoc[] diff --git a/docs/modules/airflow/pages/commandline_args.adoc b/docs/modules/airflow/pages/reference/commandline-parameters.adoc similarity index 78% rename from docs/modules/airflow/pages/commandline_args.adoc rename to docs/modules/airflow/pages/reference/commandline-parameters.adoc index 4659ddd9..330f2f47 100644 --- a/docs/modules/airflow/pages/commandline_args.adoc +++ b/docs/modules/airflow/pages/reference/commandline-parameters.adoc @@ -1,5 +1,8 @@ += Command Line Parameters -=== product-config +This operator accepts the following command line parameters: + +== product-config *Default value*: `/etc/stackable/airflow-operator/config-spec/properties.yaml` @@ -12,7 +15,7 @@ stackable-airflow-operator run --product-config /foo/bar/properties.yaml ---- -=== watch-namespace +== watch-namespace *Default value*: All namespaces diff --git a/docs/modules/airflow/pages/reference/crds.adoc b/docs/modules/airflow/pages/reference/crds.adoc new file mode 100644 index 00000000..753b4948 --- /dev/null +++ b/docs/modules/airflow/pages/reference/crds.adoc @@ -0,0 +1,3 @@ += CRD Reference + +Find all CRD reference for the Stackable Operator for Apache Airfow at: {crd-docs-base-url}/airflow-operator/{crd-docs-version}. \ No newline at end of file diff --git a/docs/modules/airflow/pages/env_var_args.adoc b/docs/modules/airflow/pages/reference/environment-variables.adoc similarity index 90% rename from docs/modules/airflow/pages/env_var_args.adoc rename to docs/modules/airflow/pages/reference/environment-variables.adoc index 3f91aac8..0cb7703d 100644 --- a/docs/modules/airflow/pages/env_var_args.adoc +++ b/docs/modules/airflow/pages/reference/environment-variables.adoc @@ -1,5 +1,8 @@ += Environment variables -=== PRODUCT_CONFIG +This operator accepts the following environment variables: + +== PRODUCT_CONFIG *Default value*: `/etc/stackable/airflow-operator/config-spec/properties.yaml` @@ -25,7 +28,7 @@ docker run \ docker.stackable.tech/stackable/airflow-operator:latest ---- -=== WATCH_NAMESPACE +== WATCH_NAMESPACE *Default value*: All namespaces diff --git a/docs/modules/airflow/pages/reference/index.adoc b/docs/modules/airflow/pages/reference/index.adoc new file mode 100644 index 00000000..ea607cfa --- /dev/null +++ b/docs/modules/airflow/pages/reference/index.adoc @@ -0,0 +1,6 @@ += Reference + +Consult the reference documentation section to find exhaustive information on: + +* Descriptions and default values of all properties in the CRDs used by this operator in the xref:reference/crds.adoc[]. +* The xref:reference/commandline-parameters.adoc[] and xref:reference/environment-variables.adoc[] accepted by the operator. \ No newline at end of file diff --git a/docs/modules/airflow/partials/nav.adoc b/docs/modules/airflow/partials/nav.adoc index 8eff2fde..4ba6a6bb 100644 --- a/docs/modules/airflow/partials/nav.adoc +++ b/docs/modules/airflow/partials/nav.adoc @@ -1,7 +1,6 @@ * xref:airflow:getting_started/index.adoc[] ** xref:airflow:getting_started/installation.adoc[] ** xref:airflow:getting_started/first_steps.adoc[] -* xref:airflow:configuration.adoc[] * xref:airflow:required-external-components.adoc[] * xref:airflow:usage-guide/index.adoc[] ** xref:airflow:usage-guide/mounting-dags.adoc[] @@ -17,3 +16,8 @@ *** xref:airflow:usage-guide/operations/pod-placement.adoc[] *** xref:airflow:usage-guide/operations/pod-disruptions.adoc[] *** xref:airflow:usage-guide/operations/graceful-shutdown.adoc[] +* xref:airflow:reference/index.adoc[] +** xref:airflow:reference/crds.adoc[] +*** {crd-docs}/airflow.stackable.tech/airflowcluster/v1alpha1/[AirflowCluster {external-link-icon}^] +** xref:airflow:reference/commandline-parameters.adoc[] +** xref:airflow:reference/environment-variables.adoc[] \ No newline at end of file diff --git a/rust/crd/src/lib.rs b/rust/crd/src/lib.rs index ec92c9a1..f330dc5b 100644 --- a/rust/crd/src/lib.rs +++ b/rust/crd/src/lib.rs @@ -184,23 +184,28 @@ pub struct AirflowClusterSpec { pub struct AirflowClusterConfig { #[serde(flatten)] pub authentication: AirflowAuthentication, + /// The name of the Secret object containing the admin user credentials and database connection details. /// Read the /// [getting started guide first steps](DOCS_BASE_URL_PLACEHOLDER/airflow/getting_started/first_steps) /// to find out more. pub credentials_secret: String, + /// The `gitSync` settings allow configuring DAGs to mount via `git-sync`. /// Learn more in the /// [mounting DAGs documentation](DOCS_BASE_URL_PLACEHOLDER/airflow/usage-guide/mounting-dags#_via_git_sync). #[serde(default)] pub dags_git_sync: Vec, + /// for internal use only - not for production use. #[serde(default)] pub expose_config: bool, + /// Whether to load example DAGs or not; defaults to false. The examples are used in the /// [getting started guide](DOCS_BASE_URL_PLACEHOLDER/airflow/getting_started/). #[serde(default)] pub load_examples: bool, + /// This field controls which type of Service the Operator creates for this AirflowCluster: /// /// * cluster-internal: Use a ClusterIP service From 75fab2d9093066e182a9608da7ad2e3e22dec233 Mon Sep 17 00:00:00 2001 From: Felix Hennig Date: Thu, 21 Dec 2023 10:42:14 +0100 Subject: [PATCH 2/3] fixed links --- docs/modules/airflow/pages/usage-guide/security.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/airflow/pages/usage-guide/security.adoc b/docs/modules/airflow/pages/usage-guide/security.adoc index fd3f6b7e..416d587c 100644 --- a/docs/modules/airflow/pages/usage-guide/security.adoc +++ b/docs/modules/airflow/pages/usage-guide/security.adoc @@ -12,7 +12,7 @@ image::airflow_security.png[Airflow Security menu] === LDAP -Airflow supports xref:nightly@home:concepts:authentication.adoc[authentication] of users against an LDAP server. This requires setting up an xref:nightly@home:concepts:authentication.adoc#authenticationclass[AuthenticationClass] for the LDAP server. +Airflow supports xref:home:concepts:authentication.adoc[authentication] of users against an LDAP server. This requires setting up an AuthenticationClass for the LDAP server. The AuthenticationClass is then referenced in the AirflowCluster resource as follows: [source,yaml] @@ -35,7 +35,7 @@ spec: Users that log in with LDAP are assigned to a default https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html#access-control[Role] which is specified with the `userRegistrationRole` property. -You can follow the xref:nightly@home:tutorials:authentication_with_openldap.adoc[] tutorial to learn how to set up an AuthenticationClass for an LDAP server, as well as consulting the xref:nightly@home:reference:authenticationclass.adoc[] reference. +You can follow the xref:home:tutorials:authentication_with_openldap.adoc[] tutorial to learn how to set up an AuthenticationClass for an LDAP server, as well as consulting the {crd-docs}/authentication.stackable.tech/authenticationclass/v1alpha1/[AuthenticationClass reference {external-link-icon}^]. The users and roles can be viewed as before in the Webserver UI, but note that the blue "+" button is not available when authenticating against LDAP: From c30ab0e4be5a35ac9b8855fbc9c82c374bfbc01e Mon Sep 17 00:00:00 2001 From: Felix Hennig Date: Thu, 21 Dec 2023 10:56:46 +0100 Subject: [PATCH 3/3] rustfmt --- rust/crd/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/crd/src/lib.rs b/rust/crd/src/lib.rs index f330dc5b..1173396b 100644 --- a/rust/crd/src/lib.rs +++ b/rust/crd/src/lib.rs @@ -205,7 +205,7 @@ pub struct AirflowClusterConfig { /// [getting started guide](DOCS_BASE_URL_PLACEHOLDER/airflow/getting_started/). #[serde(default)] pub load_examples: bool, - + /// This field controls which type of Service the Operator creates for this AirflowCluster: /// /// * cluster-internal: Use a ClusterIP service