code-chat-br / whatsapp-api

CodeChat - WhatsApp Api
https://docs.codechat.dev
Apache License 2.0
659 stars 261 forks source link

k8 liveness endpoint #58

Closed felipefontoura closed 1 year ago

felipefontoura commented 1 year ago

Hello folks,

first of all, congrats for this amazing project, it's really works for us sending transactions and marketing messages thought n8n workflows.

The last month we're deployed codechat in kubernetes infra, and it's working very well. But, for working 100% we need to define the liveness endpoint for k8.

Question: have any global endpoint to returns if all instances are connected and working well?

Thanks!

Refs: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-http-request

jrCleber commented 1 year ago

Good morning! Run the route fetchInstances. In it, you pass your globalApiKey to retrieve all instances.