You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 02a956f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: chart/docs/production-guide.rst
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -393,14 +393,16 @@ For more information on ``Ingress``, see the
393
393
Gateway API (HTTPRoute)
394
394
^^^^^^^^^^^^^^^^^^^^^^^
395
395
396
-
As an alternative to ``Ingress``, the chart can create a
397
-
`Kubernetes Gateway API <https://gateway-api.sigs.k8s.io/>`_ ``HTTPRoute`` for the API server.
396
+
As an alternative to ``Ingress``, the chart can create
397
+
`Kubernetes Gateway API <https://gateway-api.sigs.k8s.io/>`_ ``HTTPRoute`` resources for the API server and Flower.
398
398
This requires the Gateway API CRDs to be installed in the cluster and a ``Gateway`` to already exist —
399
-
the chart only creates the ``HTTPRoute`` and attaches it to the Gateway via ``parentRefs``.
399
+
the chart only creates the ``HTTPRoute`` resources and attaches them to the Gateway via ``parentRefs``.
400
400
401
401
.. code-block:: yaml
402
402
:caption: values.yaml
403
403
404
+
executor: CeleryExecutor
405
+
404
406
apiServer:
405
407
httpRoute:
406
408
enabled: true
@@ -411,16 +413,31 @@ the chart only creates the ``HTTPRoute`` and attaches it to the Gateway via ``pa
411
413
hostnames:
412
414
- airflow.example.com
413
415
414
-
For fine-grained routing, supply ``apiServer.httpRoute.rules`` directly — the entry mirrors the
415
-
upstream ``HTTPRouteRule`` schema and overrides the default rule generated from ``path`` + ``pathType``.
416
+
flower:
417
+
enabled: true
418
+
httpRoute:
419
+
enabled: true
420
+
parentRefs:
421
+
- name: main-gateway
422
+
namespace: gateway-system
423
+
sectionName: https
424
+
hostnames:
425
+
- flower.example.com
426
+
427
+
Flower HTTPRoute resources are only created when Flower itself is created, so ``flower.enabled`` must be
428
+
``true`` and the executor must include ``CeleryExecutor``.
429
+
430
+
For fine-grained routing, supply ``apiServer.httpRoute.rules`` or ``flower.httpRoute.rules`` directly —
431
+
the entry mirrors the upstream ``HTTPRouteRule`` schema and overrides the default rule generated from
432
+
the corresponding ``apiServer.httpRoute.path`` and ``apiServer.httpRoute.pathType``, or
433
+
``flower.httpRoute.path`` and ``flower.httpRoute.pathType`` values.
416
434
417
435
.. note::
418
436
419
-
``HTTPRoute`` is an alternative to the API server ``Ingress``, so enable only one of
420
-
``ingress.apiServer`` or ``apiServer.httpRoute`` — enabling both at the same time fails template
421
-
rendering. When ``apiServer.httpRoute.enabled`` is ``true``, the chart also verifies (via Helm
422
-
``Capabilities``) that the Gateway API CRDs are installed and fails with a clear message if they
423
-
are not.
437
+
``HTTPRoute`` is an alternative to ``Ingress`` for the same component, so enable only one routing
438
+
mechanism for each component. Enabling both for the same component fails template rendering.
439
+
When an ``HTTPRoute`` is enabled, the chart also verifies (via Helm ``Capabilities``) that the Gateway
440
+
API CRDs are installed and fails with a clear message if they are not.
Unless required by applicable law or agreed to in writing,
13
+
software distributed under the License is distributed on an
14
+
"AS IS"BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+
KIND, either express or implied. See the License for the
16
+
specific language governing permissions and limitations
17
+
under the License.
18
+
*/}}
19
+
20
+
###########################
21
+
## Airflow Flower HTTPRoute
22
+
###########################
23
+
{{- if and .Values.flower.enabled .Values.flower.httpRoute.enabled (contains "CeleryExecutor" .Values.executor) }}
24
+
{{- if .Values.ingress.flower.enabled }}
25
+
{{- fail "`flower.httpRoute.enabled` and `ingress.flower.enabled` are both set to `true`. HTTPRoute (Gateway API) is an alternative to the Flower Ingress; enable only one of them." }}
26
+
{{- end }}
27
+
{{- if not (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1") }}
28
+
{{- fail "`flower.httpRoute.enabled` is `true` but the Gateway API HTTPRoute CRD (`gateway.networking.k8s.io/v1`) is not installed in the cluster. Install the Gateway API CRDs (https://gateway-api.sigs.k8s.io/guides/#installing-gateway-api) before enabling `flower.httpRoute`." }}
29
+
{{- end }}
30
+
{{- if not .Values.flower.httpRoute.parentRefs }}
31
+
{{- fail "`flower.httpRoute.enabled` is `true` but `flower.httpRoute.parentRefs` is empty. An HTTPRoute must reference at least one parent Gateway; set `flower.httpRoute.parentRefs`." }}
32
+
{{- end }}
33
+
{{- $fullname := include "airflow.fullname" . }}
34
+
apiVersion: gateway.networking.k8s.io/v1
35
+
kind: HTTPRoute
36
+
metadata:
37
+
name: {{ $fullname }}-flower-httproute
38
+
labels:
39
+
tier: airflow
40
+
component: flower-httproute
41
+
release: {{ .Release.Name }}
42
+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
43
+
heritage: {{ .Release.Service }}
44
+
{{- if or .Values.labels .Values.flower.labels .Values.flower.httpRoute.labels }}
Copy file name to clipboardExpand all lines: chart/templates/flower/flower-ingress.yaml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,9 @@
22
22
#########################
23
23
{{- if .Values.flower.enabled }}
24
24
{{- if and .Values.ingress.flower.enabled (contains "CeleryExecutor" .Values.executor) }}
25
+
{{- if .Values.flower.httpRoute.enabled }}
26
+
{{- fail "`ingress.flower.enabled` and `flower.httpRoute.enabled` are both set to `true`. The Flower Ingress is an alternative to HTTPRoute (Gateway API); enable only one of them." }}
0 commit comments