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

   ### Official Helm Chart version
   
   1.9.0 (latest released)
   
   ### Apache Airflow version
   
   1.9.0
   
   ### Kubernetes Version
   
   1.24.7
   
   ### Helm Chart configuration
   
   executor: KubernetesExecutor
   multiNamespaceMode: true
   # I am using Flux as GitOps tool
   createUserJob:
         useHelmHooks: false
         applyCustomEnv: false
       migrateDatabaseJob:
         useHelmHooks: false
         applyCustomEnv: false
   
   ### Docker Image customizations
   
   _No response_
   
   ### What happened
   
   I deploy airflow in namespace called 'airflow'.
   And, when I use executor_config in tasks:
   executor_config={
       'KubernetesExecutor': {
           'namespace': 'othernamespace',
           'request_cpu': '0.5',
           'request_memory': '1G'
       }
   }
   
   task1 = PythonOperator(
       task_id='task_1',
       python_callable=task1,
       executor_config=executor_config,
       dag=dag
   )
   
   The task1 pod not run in namespace 'othernamespace', but in 'airflow'.
   
   ### What you think should happen instead
   
   Task1 pod run in namespace 'othernamespace'
   
   ### How to reproduce
   
   Values helm chart configuration edited:
   ```
   executor: KubernetesExecutor
   multiNamespaceMode: true
   # I am using Flux as GitOps tool
   createUserJob:
         useHelmHooks: false
         applyCustomEnv: false
       migrateDatabaseJob:
         useHelmHooks: false
         applyCustomEnv: false
   ```
   
   Dag code:
   ```
   import time
   from airflow import DAG
   from airflow.operators.python_operator import PythonOperator
   from datetime import datetime
   
   executor_config = {
       'KubernetesExecutor': {
           'namespace': 'othernamespace',
           'request_cpu': '0.5',
           'request_memory': '1G'
       }
   }
   
   # Define the DAG
   dag = DAG(
       'example_dag',
       description='Example DAG',
       schedule_interval='0 0 * * *',  
       start_date=datetime(2023, 6, 7),
       catchup=False
   )
   
   def task1():
       print("Running task 1")
       time.sleep(10)
   
   task1 = PythonOperator(
       task_id='task_1',
       python_callable=task1,
       executor_config=executor_config,
       dag=dag
   )
   ```
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit 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: [email protected]

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

Reply via email to