You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/11/21 17:52:51 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #6621: [AIRFLOW-6025] Add label to uniquely identify creator of Pod

kaxil commented on a change in pull request #6621: [AIRFLOW-6025] Add label to uniquely identify creator of Pod
URL: https://github.com/apache/airflow/pull/6621#discussion_r349232197
 
 

 ##########
 File path: airflow/contrib/operators/kubernetes_pod_operator.py
 ##########
 @@ -127,6 +128,15 @@ def execute(self, context):
                                                  cluster_context=self.cluster_context,
                                                  config_file=self.config_file)
 
+            # Add Airflow Version to the label
+            # And a label to identify that pod is launched by KubernetesPodOperator
+            self.labels.update(
+                {
+                    'airflow_version': airflow_version.replace('+', '-'),
 
 Review comment:
   https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/ recommend some but given we already use labels and don't follow such conventions, I made this change :
   
   https://github.com/apache/airflow/blob/fab957e763f40bf2a2398770312b4834fbd613e1/airflow/kubernetes/worker_configuration.py#L372-L378

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


With regards,
Apache Git Services