Kristof-Mattei opened a new issue #10027:
URL: https://github.com/apache/airflow/issues/10027


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the 
following questions.
   Don't worry if they're not all applicable; just try to include what you can 
:-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   This questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**:
   1.10.11
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   Irrelevant
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**:
   - **OS** (e.g. from /etc/os-release):
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   The documentation sets the expectation that I can modify the pod before it 
gets launched by using the 
`AIRFLOW__KUBERNETES__AIRFLOW_LOCAL_SETTINGS_CONFIGMAP`. 
   
https://airflow.apache.org/docs/stable/configurations-ref.html#airflow-local-settings-configmap
   
   This doesn't happen, and reading through the source code I don't see how it 
can possibly function like that.
   1. Get config value: 
https://github.com/apache/airflow/blob/master/airflow/executors/kubernetes_executor.py#L218
   2. Mount file 
https://github.com/apache/airflow/blob/master/airflow/kubernetes/worker_configuration.py#L291
   3. ??
   
   The file itself is not opened on the Airflow Scheduler, where it should've 
been used, instead, it is passed on to the worker. 
   While that may work for other things in `local_settings`, it doesn't for the 
`pod_mutating_hook`!
   
   **What you expected to happen**:
   
   `pod_mutating_hook` to work.
   **How to reproduce it**:
   
   1. Use K8s Executor
   2. Use `pod_mutating_hook`
   
   **Anything else we need to know**:
   
   I think this is a documentation issue, where the example should be removed 
(https://airflow.apache.org/docs/stable/configurations-ref.html#airflow-local-settings-configmap)


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

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


Reply via email to