gajus / lightship

Abstracts readiness, liveness and startup checks and graceful shutdown of Node.js services running in Kubernetes.
Other
519 stars 32 forks source link

Custom liveness/ readiness endpoints? #53

Open swarnadeepsaha opened 2 years ago

swarnadeepsaha commented 2 years ago

It is possible to configure liveness/ readiness endpoints?

eg.
/live to {domain}/liveness

swarnadeepsaha commented 1 year ago

@gajus Able to fix this with little adjustment. Since I don't have access to this repository the changes can not be pushed. Hence created a fork out of it.

Can this fix be included?

gajus commented 1 year ago

What's the use case for this?

swarnadeepsaha commented 1 year ago

@gajus

  1. More like a guideline that many organization uses.
  2. If you have distributed landscape, all the services' k8 manifest will look alike, it's easy to template.
  3. If you have unified probe endpoints, it's easy to create and configure metrics libaries (despite having k8)
valentindeaconu commented 1 year ago

We also need this feature because we're deploying two services under the same ingress. The AWS Load Balancer Controller does not currently support path rewrite, so we need to route the traffic through Ingress. If we cannot modify the endpoints, we will have 2 deployments that are listening on /health / /live / /ready, and we cannot expose both of them simultaneously on the same domain. If we had this feature, we could make one service listen to /service1/... and the other to /service2/..., then expose those via Ingress to the public.