WhatsApp / WhatsApp-Business-API-Setup-Scripts

The scripts related to setting up WhatsApp business API
MIT License
410 stars 433 forks source link

Provide guidance on k8s liveness probes using v1/health #10

Closed mwong56 closed 4 years ago

mwong56 commented 4 years ago

Can you provide guidance and example using k8s liveness probes hooked onto v1/health?

mengyiyuan commented 4 years ago

Hi Michael,

This is a fair ask. Let me double check if the health would be the right liveness probe and also see what we can provide information on readiness probe too.

Will get back to you here.

mwong56 commented 4 years ago

Thanks, we took a look at health but it doesn't seem to fit well. It gives an overview of the entire cluster but liveness probes need context at the pod/container level

mengyiyuan commented 4 years ago

Hi Michael,

For liveness probe, please use TCP sockets on ports 6250, 6251, 6252, 6253, which are ports used by core apps to connect to WA servers. Related doc here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-tcp-liveness-probe

For readiness probe, you can use health with a long-live health endpoint token, more details here: https://developers.facebook.com/docs/whatsapp/api/health

I will close the task now. Feel free to reopen if you have more questions. :)