configuring load balancing per ingress (#2167)
* configure load balancing through a ingress annotation * update docs
This commit is contained in:
parent
4a49d67adc
commit
36cce00fdd
11 changed files with 156 additions and 10 deletions
|
|
@ -599,6 +599,9 @@ func (n *NGINXController) createUpstreams(data []*extensions.Ingress, du *ingres
|
|||
if upstreams[defBackend].UpstreamHashBy == "" {
|
||||
upstreams[defBackend].UpstreamHashBy = anns.UpstreamHashBy
|
||||
}
|
||||
if upstreams[defBackend].LoadBalancing == "" {
|
||||
upstreams[defBackend].LoadBalancing = anns.LoadBalancing
|
||||
}
|
||||
|
||||
svcKey := fmt.Sprintf("%v/%v", ing.GetNamespace(), ing.Spec.Backend.ServiceName)
|
||||
|
||||
|
|
@ -654,6 +657,10 @@ func (n *NGINXController) createUpstreams(data []*extensions.Ingress, du *ingres
|
|||
upstreams[name].UpstreamHashBy = anns.UpstreamHashBy
|
||||
}
|
||||
|
||||
if upstreams[name].LoadBalancing == "" {
|
||||
upstreams[name].LoadBalancing = anns.LoadBalancing
|
||||
}
|
||||
|
||||
svcKey := fmt.Sprintf("%v/%v", ing.GetNamespace(), path.Backend.ServiceName)
|
||||
|
||||
// Add the service cluster endpoint as the upstream instead of individual endpoints
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue