Merge pull request #3367 from aledbf/503-restart

Remove reloads when there is no endpoints
This commit is contained in:
k8s-ci-robot 2018-11-06 06:39:04 -08:00 committed by GitHub
commit 08d5ffabbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View file

@ -68,6 +68,11 @@ local function format_ipv6_endpoints(endpoints)
end
local function sync_backend(backend)
if not backend.endpoints or #backend.endpoints == 0 then
ngx.log(ngx.INFO, string.format("there is no endpoint for backend %s. Skipping...", backend.name))
return
end
local implementation = get_implementation(backend)
local balancer = balancers[backend.name]