Skip to content

Commit

Permalink
feat(gateway): add /gw-health to gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Feb 2, 2022
1 parent c650bfe commit 5109a41
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
19 changes: 19 additions & 0 deletions deploy/kubernetes/gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ spec:
- image: docker.io/lafyun/gateway:0.7.6
imagePullPolicy: IfNotPresent
name: gateway
startupProbe:
httpGet:
path: /gw-health
port: http
httpHeaders:
- name: Referer
value: startupProbe
periodSeconds: 3
timeoutSeconds: 3
failureThreshold: 20
readinessProbe:
httpGet:
path: /gw-health
port: http
httpHeaders:
- name: Referer
value: readinessProbe
periodSeconds: 10
timeoutSeconds: 3
resources:
requests:
memory: "256Mi"
Expand Down
14 changes: 14 additions & 0 deletions packages/gateway/conf.kubernetes/system.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,18 @@ server {
location / {
index index.html index.htm;
}
}


server {
listen 80 default_server;
server_name _;

location /gw-health {
default_type text/html;
content_by_lua_block {
ngx.say("running")
return 200
}
}
}

0 comments on commit 5109a41

Please sign in to comment.