fletchjeff commented on code in PR #27433:
URL: https://github.com/apache/airflow/pull/27433#discussion_r1010238877


##########
airflow/providers/cncf/kubernetes/decorators/kubernetes.py:
##########
@@ -57,7 +57,7 @@ def _read_file_contents(filename):
 class _KubernetesDecoratedOperator(DecoratedOperator, KubernetesPodOperator):
     custom_operator_name = "@task.kubernetes"
 
-    template_fields: Sequence[str] = ("op_args", "op_kwargs")
+    template_fields: Sequence[str] = ("op_args", "op_kwargs", "env_vars")

Review Comment:
   Unfortunately not all of those `template_fields` are applicable. 
Specifically `cmds` and `arguments` are used to run the kuberenetes pod using 
the python code written under the decorator
   
   
https://github.com/apache/airflow/blob/64174ce25ae800a38e712aa0bd62a5893ea2ff99/airflow/providers/cncf/kubernetes/decorators/kubernetes.py#L66-L74
   
   If you pass in the `cmds` attribute, it raises an error. The list could be 
expanded to be: `image`, `env_vars`, `labels`, `config_file`, 
`pod_template_file`, and `namespace`, as described 
[here](https://docs.astronomer.io/learn/kubepod-operator#optional-arguments)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to