Infisical / infisical

♾ Infisical is the open-source secret management platform: Sync secrets across your team/infrastructure, prevent secret leaks, and manage internal PKI
https://infisical.com
Other
15.65k stars 973 forks source link

Add liveness probe (front/back) #445

Open Grraahaam opened 1 year ago

Grraahaam commented 1 year ago

Feature description

Improve k8s pod management by adding consistent probes on both front/backend

Today front/back only have a readinessProbe

Why would it be useful?

For k8s to be able to detect both live/ready states and apply automatic actions (e.g. restart, detach from related service)

Additional context

image

image

maidul98 commented 1 year ago

Interesting, any thoughts on what we should probe for during liveness probe? My thought is we can use exec to run a command inside of the container

Grraahaam commented 1 year ago

Basically, today the liveness could be what the readiness is, since in this case "live" means : the API/service/server is able to handle requests (receiving a 200 OK response code).

The readiness is often use to check an API's dependencies, like databases, external APIs, internal services. Ready means : I'm alive and I work correctly, as expected.

Suggestions :

maidul98 commented 1 year ago

Yes, i think these readiness will work!

Grraahaam commented 9 months ago

Now that the front and the back are embedded in a single image, we might still need to check both services within.

I've seen that there's only one readiness configured here, although k8s have different behaviour depending on the probe type, explained here.

Can I add the missing live/readiness probes (front/back)?

maidul98 commented 9 months ago

Yes, please make a PR for it!