mik-laj commented on a change in pull request #15204:
URL: https://github.com/apache/airflow/pull/15204#discussion_r607111232



##########
File path: airflow/cli/commands/kubernetes_command.py
##########
@@ -91,9 +91,24 @@ def cleanup_pods(args):
     kube_client = get_kube_client()
     print(f'Listing pods in namespace {namespace}')
     list_kwargs = {"namespace": namespace, "limit": 500}
+    airflow_pod_labels = [
+        'airflow-worker',
+        'dag_id',
+        'task_id',
+        'execution_date',
+        'try_number',
+        'airflow_version',
+        'kubernetes_executor',
+    ]
     while True:  # pylint: disable=too-many-nested-blocks
         pod_list = kube_client.list_namespaced_pod(**list_kwargs)

Review comment:
       Can we use `label_selector`/`field_selector` parameters to do 
server-side filtering? 




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


Reply via email to