You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by el...@apache.org on 2024/02/07 06:37:42 UTC

(airflow) branch main updated: Update KubernetesPodOperator docs argument precedence (#37047)

This is an automated email from the ASF dual-hosted git repository.

eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new d155ee8288 Update KubernetesPodOperator docs argument precedence  (#37047)
d155ee8288 is described below

commit d155ee8288dd22a9675aee13991982e2738f58f2
Author: Keto D. Zhang <ke...@gmail.com>
AuthorDate: Tue Feb 6 22:37:34 2024 -0800

    Update KubernetesPodOperator docs argument precedence  (#37047)
    
    * Fix docs argument precedence uses KPO args or V1Pod()
    
    * fixup! Fix docs argument precedence uses KPO args or V1Pod()
    
    * Apply suggestion by @amoghrajesh
    
    Co-authored-by: Amogh Desai <am...@gmail.com>
    
    * Add docs pod_template_dict to arg precedence
    
    * Fix precedence to KPO argument > full_pod_spec > pod_template_file > pod_template_dict > V1Pod
    
    * Fix backticks
    
    ---------
    
    Co-authored-by: Amogh Desai <am...@gmail.com>
---
 docs/apache-airflow-providers-cncf-kubernetes/operators.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/apache-airflow-providers-cncf-kubernetes/operators.rst b/docs/apache-airflow-providers-cncf-kubernetes/operators.rst
index 78f40cc68b..58fab491b8 100644
--- a/docs/apache-airflow-providers-cncf-kubernetes/operators.rst
+++ b/docs/apache-airflow-providers-cncf-kubernetes/operators.rst
@@ -77,8 +77,8 @@ You can print out the Kubernetes manifest for the pod that would be created at r
 Argument precedence
 ^^^^^^^^^^^^^^^^^^^
 
-When building the pod object, there may be overlap between KPO params, pod spec, template and airflow connection.
-In general, the order of precedence is KPO argument > full pod spec > pod template file > airflow connection.
+When KPO defines the pod object, there may be overlap between the :class:`~airflow.providers.cncf.kubernetes.operators.pod.KubernetesPodOperator` arguments.
+In general, the order of precedence is KPO field-specific arguments (e.g., ``secrets``, ``cmds``, ``affinity``), more general templates ``full_pod_spec``, ``pod_template_file``, ``pod_template_dict``,  and followed by ``V1Pod``, by default.
 
 For ``namespace``, if namespace is not provided via any of these methods, then we'll first try to
 get the current namespace (if the task is already running in kubernetes) and failing that we'll use