You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/08 08:26:47 UTC

[GitHub] [airflow] stefanondisponibile opened a new issue #19460: Templated volumes for KubernetesExecutor.

stefanondisponibile opened a new issue #19460:
URL: https://github.com/apache/airflow/issues/19460


   ### Description
   
   When using `PersistenVoume`s or `PVC`s with the Kubernetes Executor it should be possible to build their configuration (at least their names) dynamically.
   
   ### Use case/motivation
   
   I want to attach some volume to running worker's containers, but I need to build its name dynamically (e.g. using the `dag_id`, `task_id`, or other values available at "runtime"). I'm using quotes because this wouldn't be actually "runtime", but just before it, since we're still building the pod template.
   
   Any way to do that?
   If there's a way, I'm willing to submit a PR.
   
   ### 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] stefanondisponibile closed issue #19460: Templated volumes for KubernetesExecutor.

Posted by GitBox <gi...@apache.org>.
stefanondisponibile closed issue #19460:
URL: https://github.com/apache/airflow/issues/19460


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jedcunningham commented on issue #19460: Templated volumes for KubernetesExecutor.

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on issue #19460:
URL: https://github.com/apache/airflow/issues/19460#issuecomment-999683757


   Operator by operator, this should be possible with `template_fields` and something similar to [this](https://github.com/apache/airflow/blob/81f92d6c321992905d239bb9e8556720218fe745/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py#L295-L298), but globally it's tougher.
   
   I'd try and use either [pod_mutation_hook](https://airflow.apache.org/docs/apache-airflow/stable/kubernetes.html#pod-mutation-hook) or [task_instance_mutation_hook](https://airflow.apache.org/docs/apache-airflow/stable/concepts/cluster-policies.html#task-instance-mutation).


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org