You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/07/29 10:20:00 UTC

[jira] [Commented] (AIRFLOW-5066) Usage of FieldRef in Kubernetes env execution

    [ https://issues.apache.org/jira/browse/AIRFLOW-5066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16895130#comment-16895130 ] 

ASF GitHub Bot commented on AIRFLOW-5066:
-----------------------------------------

jsurloppe commented on pull request #5680: [AIRFLOW-5066] allow k8s fieldref substitution
URL: https://github.com/apache/airflow/pull/5680
 
 
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [x] My PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
     - https://issues.apache.org/jira/browse/AIRFLOW-5066
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI changes:
   That PR change the order of setting env vars in kubernetes definition to allow substitution with pod metadata.
   
   ### Tests
   
   - [x]  does not need testing for this extremely good reason:
   Airflow behavior doesn't change, it's just a matter kubernetes API call.
   
   ### Commits
   
   - [x] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Code Quality
   
   - [x] Passes `flake8`
 
----------------------------------------------------------------
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:
users@infra.apache.org


> Usage of FieldRef in Kubernetes env execution
> ---------------------------------------------
>
>                 Key: AIRFLOW-5066
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5066
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: executors
>    Affects Versions: 1.10.4, 2.0.0, 1.10.5
>            Reporter: Julien Surloppe
>            Priority: Minor
>
> In Kubernetes, dynamic pod metadata can be set as environment variables and then used as substitution in other environment variables.
> Currently in Airflow, the pod request creation set those variables after the ones that can use substitutions so them doen't do it.
> Example usage is:
>  * define a variable SPARK_LOCAL_IP using the pod metadata status.podIP
>  * using this variable in Spark options as -Dspark.driver.host=$(SPARK_LOCAL_IP)
> I will do a PR to fix this behavior.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)