dgdelahera opened a new pull request, #23450:
URL: https://github.com/apache/airflow/pull/23450

   When running the Kubernetes Pod Operator, the tasks waits until the pod is 
in a Terminate state. In the case that we are running the Pod Operator with 
multiple containers, the Pod will not be in a Terminate state until all the 
containers are in a Terminate state. This can be a problem because the 
container with the main workload can be completed or failed, but the task will 
still run until the rest of the container finished (in the case of sidecars, 
those won't finish).
   
   This PR adds an option in the Operator to wait all the containers. If the 
option is set to False, the task will finish once a container is in a 
terminated state.
   
   
   Example of a Pod with one container in a terminated state. Note that the Pod 
status is `Running`.
   ```
   Name:        ********
   Namespace:   ********
   Priority:     0
   Node:        ********
   Start Time:   Thu, 28 Apr 2022 15:50:25 +0200
   Labels:       airflow_version=2.1.4
                 dag_id=accounts-refresh
                 execution_date=2022-04-28T135015.7751980000-8035c9679
                 kubernetes_pod_operator=True
                 task_id=********
                 try_number=1
   Annotations:  [kubernetes.io/psp](http://kubernetes.io/psp): eks.privileged
   Status:       Running
   IP:           ********
   IPs:
     IP:  ********
   Containers:
     base:
       Container ID:   ********
       Image:          ********
       Image ID:       ********
       Port:           <none>
       Host Port:      <none>
       State:          Terminated
         Reason:       Error
         Exit Code:    1
         Started:      Thu, 28 Apr 2022 15:50:26 +0200
         Finished:     Thu, 28 Apr 2022 15:50:30 +0200
       Ready:          False
       Restart Count:  0
       Environment:
         ********
       Mounts:
         /var/run/secrets/kubernetes.io/serviceaccount from 
kube-api-access-xnh99 (ro)
     envoy:
       Container ID:   ********
       Image:         ********
       Image ID:       ********
       Port:           <none>
       Host Port:      <none>
       State:          Running
         Started:      Thu, 28 Apr 2022 15:50:26 +0200
   ```
   
   


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

Reply via email to