Controller: set DefaultBackend service to upstream

This commit is contained in:
Eugene Apollonsky 2024-10-11 11:58:00 +03:00
parent 05eda3db8b
commit d3cc0a8894

View file

@ -938,6 +938,7 @@ func (n *NGINXController) getBackendServers(ingresses []*ingress.Ingress) ([]*in
nb := upstream.DeepCopy() nb := upstream.DeepCopy()
nb.Name = name nb.Name = name
nb.Endpoints = endps nb.Endpoints = endps
nb.Service = location.DefaultBackend
aUpstreams = append(aUpstreams, nb) aUpstreams = append(aUpstreams, nb)
location.DefaultBackendUpstreamName = name location.DefaultBackendUpstreamName = name