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
|
|
@ -39,11 +39,7 @@ spec:
|
|||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.service.portName }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /api/livez
|
||||
port: {{ .Values.service.portName }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
|
|
|
|||
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