We also add parameter include_try_number to control the inclusion of this label instead of possibly filtering it out later. This method doesn’t return all labels, but only those specific to the TI. Method create_labels_for_pod is renamed _get_ti_pod_labels. It now takes argument context in order to add TI-specific pod labels previously they were added after return. Method create_pod_request_obj is renamed build_pod_request_obj. See methods await_pod_start, follow_container_logs, await_container_completion and await_pod_completion. With this change the pod monitoring (and log following) is orchestrated directly from execute and it is the same whether it’s a “found” pod or a “new” pod. Previously it monitored a “found” pod until completion. after an airflow worker failure) is moved out of execute and into method find_pod. Logic to search for an existing pod (e.g. Method create_pod_launcher is converted to cached property pod_managerĬonstruction of k8s CoreV1Api client is now encapsulated within cached property client Details on method renames, refactors, and deletions (if configured to delete the pod) and push XCom (if configured to push XCom). If the pod terminates successfully, we delete the pod KubernetesPodOperator.process_pod_deletion> We raise an AirflowException to fail the task instance. To delete its pod, we delete it KubernetesPodOperator.process_pod_deletion>. Indicating that the pod failed and should not be “reattached to” in a retry. IfĪdditionally the task is configured not to delete the pod after termination, we apply a label KubernetesPodOperator.patch_already_checked> If the pod terminates unsuccessfully, we attempt to log the pod events PodLauncher.read_pod_events>. after a worker failure) orĬreated anew, the waiting logic may have occurred in either handle_pod_overlap or create_new_pod_for_operator.Īfter the pod terminates, we execute different cleanup tasks depending on whether the pod terminated successfully. Previously, depending on whether the pod was “reattached to” (e.g. Value from the base container, we await pod completion. Logs, the operator will instead KubernetesPodOperator.await_container_completionĮither way, we must await container completion before harvesting xcom. The operator will follow the base container logs and forward these logs to the task logger until Pending phase ( ~.KubernetesPodOperator.await_pod_start). The first step is to wait for the pod to leave the The “waiting” part of execution has three components. The package supports the following python versions: 3.7,3.8,3.9,3.10 Requirements Pip install apache-airflow-providers-cncf-kubernetes You can install this package on top of an existing Airflow 2 installation (see Requirements belowįor the minimum Airflow version supported) via You can find package information and changelog for the provider All classes for this provider packageĪre in python package. This is a provider package for cncf.kubernetes provider. Package apache-airflow-providers-cncf-kubernetes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |