k8snetworkplumbingwg / whereabouts

A CNI IPAM plugin that assigns IP addresses cluster-wide
Apache License 2.0
274 stars 120 forks source link

Considerations for total processing time during CNI DEL (given that we have the controller) #242

Open dougbtv opened 2 years ago

dougbtv commented 2 years ago

If there's API server connectivity problems (or congestion that causes api server throttling), Whereabouts can sit for a long time during CNI DEL causing a pod deletion to take a while.

Could it be possible that we just set some kind of maximum run time for CNI DEL, and then just bail out if we reach it? And then let the controller kick and clean up the address.

I'm not sure what happens with the pod deletion event for the controller in times of api server wonkiness, so, that's another consideration.

spitballing

maiqueb commented 2 years ago

AFAIU, there is already a timeout. It is defined here.

Now ... I just don't understand why have this specific value for deletes.

Furthermore, there's a timeout on the k8s client, which can be overriden from the configuration.

@dougbtv I would suggest whatever timeout we have for add / del to be configurable. One size fits all is a disaster waiting to happen for some scenarios.