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/03/26 13:42:20 UTC
[GitHub] [airflow] andriisoldatenko commented on a change in pull request
#4459: [AIRFLOW-3649] Feature to add extra labels to kubernetes worker pods
andriisoldatenko commented on a change in pull request #4459: [AIRFLOW-3649] Feature to add extra labels to kubernetes worker pods
URL: https://github.com/apache/airflow/pull/4459#discussion_r269106802
##########
File path: airflow/contrib/executors/kubernetes_executor.py
##########
@@ -252,6 +265,15 @@ def _validate(self):
'or `dags_in_image` '
'or `git_repo and git_branch and git_dags_folder_mount_point`')
+ # cannot allow certain labels, as airflow needs them
+ if self.kube_extra_labels:
+ for k in self.protected_labels:
+ if k in self.kube_extra_labels:
+ raise AirflowConfigException(
+ 'In kubernetes mode `extra_labels` cannot include '
+ '`airflow-worker`, `dag_id`, `task_id`, `try_number`, or `execution_date`'
Review comment:
I prefer to use `self.protected_labels` instead of hardcode it here ^
----------------------------------------------------------------
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