ashb commented on a change in pull request #10666:
URL: https://github.com/apache/airflow/pull/10666#discussion_r481202289
##########
File path: airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
##########
@@ -441,3 +444,10 @@ def monitor_launched_pod(self, launcher, pod) ->
Tuple[State, Optional[str]]:
'Pod returned a failure: {state}'.format(state=final_state)
)
return final_state, result
+
+ def on_kill(self) -> None:
+ if self.pod:
+ pod: k8s.V1Pod = self.pod
+ namespace = pod.metadata.namespace
+ name = pod.metadata.name
+ self.client.delete_namespaced_pod(name=name, namespace=namespace,
grace_period_seconds=0)
Review comment:
Isn't gracePeriodSeconds something else than how long before the pod is
stopped -- this controls how long the pod is kept around for in the API server,
but not when the pod is terminated, isn't it?
(I remember we investigated this for an EKS fix around short lived pods and
increasing this didn't help.)
----------------------------------------------------------------
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]