Add verification of lua load balancer to health check (#2308)
This commit is contained in:
parent
888b74b336
commit
1c65320618
3 changed files with 34 additions and 1 deletions
|
|
@ -487,10 +487,32 @@ http {
|
|||
set $proxy_upstream_name "-";
|
||||
|
||||
location {{ $healthzURI }} {
|
||||
{{ if $cfg.EnableOpentracing }}
|
||||
opentracing off;
|
||||
{{ end }}
|
||||
access_log off;
|
||||
return 200;
|
||||
}
|
||||
|
||||
location /is-dynamic-lb-initialized {
|
||||
{{ if $cfg.EnableOpentracing }}
|
||||
opentracing off;
|
||||
{{ end }}
|
||||
access_log off;
|
||||
|
||||
content_by_lua_block {
|
||||
local configuration = require("configuration")
|
||||
local backend_data = configuration.get_backends_data()
|
||||
if not backend_data then
|
||||
ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
ngx.say("OK")
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
|
||||
location /nginx_status {
|
||||
set $proxy_upstream_name "internal";
|
||||
{{ if $cfg.EnableOpentracing }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue