feat: add /healthz and /readyz endpoints for kubernetes (#374)

swagger2
Ettore Di Giacinto 2 years ago committed by GitHub
parent 589dfae89f
commit bf54b78270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      api/api.go

@ -114,6 +114,14 @@ func App(opts ...AppOption) *fiber.App {
app.Static("/generated-images", options.imageDir)
}
ok := func(c *fiber.Ctx) error {
return c.SendStatus(200)
}
// Kubernetes health checks
app.Get("/healthz", ok)
app.Get("/readyz", ok)
// models
app.Get("/v1/models", listModels(options.loader, cm))
app.Get("/models", listModels(options.loader, cm))

Loading…
Cancel
Save