health readiness check: add /healthz endpoint for nginx readiness check, set failure threshold to 3 (similar to ingress) (#562)

This commit is contained in:
Ilya Kreymer 2023-02-06 15:08:05 -08:00 committed by GitHub
parent 17e1628d2d
commit 21745fb6f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View File

@ -63,9 +63,13 @@ spec:
readinessProbe:
httpGet:
path: /
port: 80
path: /healthz
port: 8880
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
---
apiVersion: v1

View File

@ -1,5 +1,15 @@
include ./resolvers/resolvers.conf;
server {
listen 8880;
# health check for k8s
location /healthz {
return 200;
}
}
server {
listen 80 default_server;
server_name _;
@ -18,13 +28,13 @@ server {
# fallback to index for any page
error_page 404 /index.html;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# used in both k8s and docker: RWP_BASE_URL set in Dockerfile
# serve replay service worker, RWP_BASE_URL set in Dockerfile
location /replay/sw.js {
add_header Content-Type application/javascript;
return 200 'importScripts("${RWP_BASE_URL}sw.js");';