o-nikolas commented on code in PR #75251: URL: https://github.com/apache/airflow/pull/75251#discussion_r4342596399
########## providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/cli/kubernetes_command.py: ########## @@ -148,7 +149,8 @@ def _get_pod_completion_time(pod): @providers_configuration_loaded def cleanup_pods(args): Review Comment: From mine, that builds on this: >Building on this: the obvious fix, swapping get_kube_client for _get_executor_kube_client(team_name=team_name), only covers the config route ([<team>=kubernetes_executor] client_factory). It won't pick up the new client_factory class attribute, because cleanup-pods never loads an executor class. Once AwsEksExecutor moves to the class attribute (the follow-up this PR enables), cleanup-pods --team for an EKS team will still fall back to get_kube_client, with in_cluster=True by default. > There's also an ambiguity: a team can list more than one Kubernetes-family executor (the new docs present a plain KubernetesExecutor alongside a subclass as supported), and those can point at different clusters, so --team alone doesn't say which cluster to clean. > One option is to resolve the team's executor class and pass its factory through -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
