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

   ### Description
   
   Policies do not run at the startup of each worker, only in dag processor.
   
   ### Use case/motivation
   
   I'm using some policies for dags and tasks and I noticed that the policies 
are executed continuously by the dagprocessor and ok that makes sense, but it 
is also executed in the workers when each task starts. (using KubernesExecutor)
   
   Why do they run on workers? Is there any way for policies not to run on 
workers, by configuration?
   
   We use airflow with each project in its namespace, and if any of the 
policies need extra permissions in kubernetes, we can just link it to the dag 
processor. However, if the task is executed in each namespace, we will need to 
have these permissions in each namespace and this may end up complicating the 
use of policies in addition to the project image needing specific dependencies 
to run the policies.
   
   
   ### Related issues
   
   I didn't find
   
   ### Are you willing to submit a PR?
   
   - [ ] 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-unsubscr...@airflow.apache.org.apache.org

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

Reply via email to