Javier162380 opened a new pull request #8009: Cli/kubernetes
URL: https://github.com/apache/airflow/pull/8009
 
 
   Adding a new command to the Airflow CLI.
   ``` bash
   airflow kubernetes pod-preview dag-id --sub-dir
   ```
   The idea is to be able to generate pod templates from KubernetesPodOperator, 
so given a target dag it can generate all the k8s pod templates and printing in 
the CLI.
   
   Example.
   
   
![image](https://user-images.githubusercontent.com/25264748/77898454-6e94a280-727b-11ea-8ca3-64141e02b040.png)
   
![image](https://user-images.githubusercontent.com/25264748/77898528-91bf5200-727b-11ea-9847-50f454f3a879.png)
   
   Just one consideration I am not connecting to any Kubernetes client so I am 
generating a default service account which means that you can launch this pod 
in a Kubernetes cluster with a command like this.
   ```
   kubectl apply -f file.yaml
   ```
   Any feedback here is appreciated.
   
   Also to be able to test this feature I need to add a new example-dag, 
   ``` bash
   example_kubernetes_pod_operator.py
   ```
   It is the same example given by Google in their composer tutorial 
(https://cloud.google.com/composer/docs/how-to/using/using-kubernetes-pod-operator),
 but adapting the imports to the new Kubernetes module import system.
   
   
   ---
   Issue link: WILL BE INSERTED BY 
[boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [ ] Description above provides context of the change
   - [ ] Unit tests coverage for changes (not needed for documentation changes)
   - [ ] Commits follow "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)"
   - [ ] Relevant documentation is updated including usage instructions.
   - [ ] I will engage committers as explained in [Contribution Workflow 
Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In the case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backward incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request 
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)
 for more information.

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


With regards,
Apache Git Services

Reply via email to