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/04/29 14:12:58 UTC

[GitHub] [airflow] ashb commented on a change in pull request #5134: [AIRFLOW-4159] Add support for additional static labels for kubernetes

ashb commented on a change in pull request #5134: [AIRFLOW-4159] Add support for additional static labels for kubernetes
URL: https://github.com/apache/airflow/pull/5134#discussion_r279380374
 
 

 ##########
 File path: airflow/contrib/kubernetes/worker_configuration.py
 ##########
 @@ -201,6 +201,11 @@ def _get_security_context(self):
 
         return security_context
 
+    def _get_labels(self, labels):
+        copy = labels.copy()
+        copy.update(self.kube_config.kube_labels)
 
 Review comment:
   This will overwrite dynamic labels with the static versions from config which is probably the wrong way around - we need the dynamic ones to "win":
   
   ```
   copy = self.kube_config.kube_labels.copy()
   copy.update(labels)
   return copy
   ```
   
   I think

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