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:
[email protected]


With regards,
Apache Git Services

Reply via email to