refactor: add /api/livez endpoint for kubernetes liveness probe, remove readiness probe
This commit is contained in:
parent
57dc162ba1
commit
56069dbda5
2 changed files with 15 additions and 5 deletions
14
src/pages/api/livez.ts
Normal file
14
src/pages/api/livez.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import type {NextApiRequest, NextApiResponse} from 'next'
|
||||
|
||||
// GET /api/livez
|
||||
export default async function handle(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse,
|
||||
) {
|
||||
if (req.method !== 'GET') {
|
||||
res.status(405).end();
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(200).json({status: 'ok'});
|
||||
}
|
||||
Reference in a new issue