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

ASF subversion and git services commented on AIRFLOW-4739:
----------------------------------------------------------

Commit 8648e24e3080c8c6f44e16a5144dbfe125ba6a43 in airflow's branch 
refs/heads/v1-10-test from George Miller
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=8648e24 ]

[AIRFLOW-4739] Add ability to arbitrarily define kubernetes worker pod labels 
(#5376)

Allow task definitions to specify labels on the worker pods that
execute that task by specifying an extra field in executor_config
like so
`executor_config={"KubernetesExecutor": {"labels": {"foo":"bar"}}}`

(cherry picked from commit f457b1f4ae8b253488344a219ad65edea2c7055b)


> Kubernetes Executor:  Allow per task labels on task pods
> --------------------------------------------------------
>
>                 Key: AIRFLOW-4739
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4739
>             Project: Apache Airflow
>          Issue Type: New Feature
>          Components: executors
>    Affects Versions: 1.10.4
>            Reporter: George Miller
>            Assignee: George Miller
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.10.4
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I want to be able to add arbitrary labels to an airflow worker pod.  For 
> example, I want to specify this in the task definition:
> ```
>  run_this = PythonOperator(
>  task_id='print_the_context',
>  provide_context=True,
>  python_callable=my_sleeping_function,
>  executor_config={"KubernetesExecutor": {"labels":
> {"test": "label"}
> }},
>  dag=dag,
>  )
>  ```
> And have my worker pod have the label `test:label`. 
>  
> My main use case for this is for auditing.  We audit our kubernetes cluster 
> by tags, attributing cost based on how much resources the pod uses.  
>  
> I will make a PR.



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

Reply via email to