anteverse opened a new issue, #43480:
URL: https://github.com/apache/airflow/issues/43480

   ### Description
   
   Unless it's been kept out templated fields on purpose, I would like to add 
the param `name` of KubernetesPodOperator into template_fields.
   
   My guess is that we wished to protect the pod name and guarantee the right 
syntax via `KubernetesPodOperator._set_name`. But I think we could have the 
best of both worlds by adding `name` to template_fields and have the protected 
name through something like `self.pod_name = self._set_pod_name(name)`, or 
equivalent.
   
   Would that be worth a shot? I'm willing to submit a short PR about this.
   
   Thanks a lot!
   
   ### Use case/motivation
   
   The current use-case is when we explore pods from the Kubernetes side, it's 
easy to have `pod_name=task_id` but that's not sufficient when we have several 
DAGs with identical tasks in them.
   Discriminant and dynamic information can be passed to labels or annotations 
since they're templated fields, but the pod name isn't.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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