Skip to content

Commit

Permalink
Avoid confusion in doc for CeleryKubernetesExecutor (#13116)
Browse files Browse the repository at this point in the history
Make the doc around CeleryKubernetesExecutor clearer.
  • Loading branch information
XD-DENG authored Dec 16, 2020
1 parent 84b4e6e commit 2491a93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion airflow/config_templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,8 @@
- name: kubernetes_queue
description: |
Define when to send a task to ``KubernetesExecutor`` when using ``CeleryKubernetesExecutor``.
When the queue of a task is ``kubernetes_queue``, the task is executed via ``KubernetesExecutor``,
When the queue of a task is the value of ``kubernetes_queue`` (default ``kubernetes``),
the task is executed via ``KubernetesExecutor``,
otherwise via ``CeleryExecutor``
version_added: ~
type: string
Expand Down
3 changes: 2 additions & 1 deletion airflow/config_templates/default_airflow.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,8 @@ sentry_dsn =
# This section only applies if you are using the ``CeleryKubernetesExecutor`` in
# ``[core]`` section above
# Define when to send a task to ``KubernetesExecutor`` when using ``CeleryKubernetesExecutor``.
# When the queue of a task is ``kubernetes_queue``, the task is executed via ``KubernetesExecutor``,
# When the queue of a task is the value of ``kubernetes_queue`` (default ``kubernetes``),
# the task is executed via ``KubernetesExecutor``,
# otherwise via ``CeleryExecutor``
kubernetes_queue = kubernetes

Expand Down
3 changes: 2 additions & 1 deletion airflow/executors/celery_kubernetes_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class CeleryKubernetesExecutor(LoggingMixin):
"""
CeleryKubernetesExecutor consists of CeleryExecutor and KubernetesExecutor.
It chooses an executor to use based on the queue defined on the task.
When the queue is `kubernetes`, KubernetesExecutor is selected to run the task,
When the queue is the value of ``kubernetes_queue`` in section ``[celery_kubernetes_executor]``
of the configuration (default value: `kubernetes`), KubernetesExecutor is selected to run the task,
otherwise, CeleryExecutor is used.
"""

Expand Down

0 comments on commit 2491a93

Please sign in to comment.