foriequal0/pod-graceful-drain

Does we need to tweak any other variable to make this work

jyotibhanot opened this issue · 3 comments

Do we need to adjust terminationGracePeriodSeconds or any other value? I am trying to achieve zero downtime deployment using IP as targets as mentioned in the posts

https://easoncao.com/zero-downtime-deployment-when-using-alb-ingress-controller-on-amazon-eks-and-prevent-502-error/
Do I need to adjust any variable in target group like deregistration delay to make this work?

I've created this package to avoid adjusting terminationGracePeriodSeconds.
You can adjust it if you want to.

It is 100 seconds, I will see if I have to adjust it. What is it doing behind the scenes, can you tell me a bit? thanks for the prompt response.

It does what is written in README.

pod-graceful-drain solves this by abusing admission webhooks. It intercepts the deletion/eviction of a pod deletion/eviction process to prevent the pod from getting terminated for a period. It'll take appropriate methods to delay the pod deletion: deny the admission, response the admission very slowly, mutate the eviction request to dry-run, etc. Then the pod will be eventually terminated by the controller after designated timeouts. With this delay, traffics are drained safely since the pod is still alive and can serve misdirected new traffics.

https://github.com/foriequal0/pod-graceful-drain/blob/main/README.md#what-is-this