Return 503 by default when no endpoint is available
This commit is contained in:
parent
1f269d4e4d
commit
1062340b0d
2 changed files with 10 additions and 4 deletions
|
|
@ -603,8 +603,8 @@ func (ic *GenericController) getBackendServers(ingresses []*extensions.Ingress)
|
|||
for _, location := range server.Locations {
|
||||
if upstream.Name == location.Backend {
|
||||
if len(upstream.Endpoints) == 0 {
|
||||
glog.V(3).Infof("upstream %v does not have any active endpoints. Using default backend", upstream.Name)
|
||||
location.Backend = "upstream-default-backend"
|
||||
glog.V(3).Infof("upstream %v does not have any active endpoints.", upstream.Name)
|
||||
location.Backend = ""
|
||||
|
||||
// check if the location contains endpoints and a custom default backend
|
||||
if location.DefaultBackend != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue