Owen-CH-Leung commented on code in PR #34500:
URL: https://github.com/apache/airflow/pull/34500#discussion_r1334939073
##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -822,8 +823,12 @@ def process_pod_deletion(self, pod: k8s.V1Pod, *,
reraise=True):
self.log.info("Deleting pod: %s", pod.metadata.name)
self.pod_manager.delete_pod(pod)
elif should_delete_pod and istio_enabled:
- self.log.info("Deleting istio-proxy sidecar inside %s: ",
pod.metadata.name)
- self.kill_istio_sidecar(pod)
+ if container_is_running(pod, self.ISTIO_CONTAINER_NAME):
+ self.log.info("Deleting istio-proxy sidecar inside %s:
", pod.metadata.name)
+ self.kill_istio_sidecar(pod)
+ self.pod_manager.delete_pod(pod)
+ else:
+ self.pod_manager.delete_pod(pod)
Review Comment:
hmmm yes. In my istio version I can see that `delete_namespaced_pod` works
even when sidecar is running, and seems to me that we don't actually need to
`kill_istio_sidecar` at all. However I'm not sure if this behaviour also
applies to older version of istio. Shall we keep the logic to end istio sidecar
followed by deleting the pod ? Or we should just go ahead to delete the pod
directly
--
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]