airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-2920) Kubernetes pod operator: namespace is a hard requirement
Date Mon, 20 Aug 2018 14:49:00 GMT

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

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

jpds opened a new pull request #3774: [AIRFLOW-2920] Added downward API metadata to Kubernetes
pods
URL: https://github.com/apache/incubator-airflow/pull/3774
 
 
   ### 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-2920
   
   ### Description
   
   This adds https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/downward-api.md
metadata to pods spun up by the Kubernetes executor. This allows one to then dynamically specify
a namespace in the DAG task definition with:
   
   ```
   task1 = KubernetesPodOperator(
           namespace=os.getenv('POD_NAMESPACE'),
           ...
   ```
   
   Thus allowing multiple Kubernetes deployments to use the same Docker image.
   
   ### Tests
   
   - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely
good reason:
   
   There does not appear to be tests for the manifest the Kubernetes executor generates.
   
   ### 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/)":
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes how to use
it.
   
   ### Code Quality
   
   - [ ] Passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
   
   @dimberman 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Kubernetes pod operator: namespace is a hard requirement
> --------------------------------------------------------
>
>                 Key: AIRFLOW-2920
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2920
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Jon Davies
>            Priority: Major
>
> Hello,
> I'm using the Kubernetes pod operator for my DAGs, I install Airflow to its own namespace
within my Kubernetes cluster (for example: "testing-airflow") and I would like pods spun up
by that Airflow instance to live in that namespace.
> However, I have to hardcode the namespace into my DAG definition code and so I have to
rebuild the Docker image for Airflow to be able to spin up a "production-airflow" namespace
as the namespace is a hard requirement in the Python code - it'd be nice if the DAG could
just default to its own namespace if none is defined.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message