Merge pull request #1233 from aledbf/fix-client-bs

Fix ClientBodyBufferSize annotation
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-08-23 14:30:39 -04:00 committed by GitHub
commit 875fd778e1

View file

@ -633,9 +633,6 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress
anns := ic.annotations.Extract(ing) anns := ic.annotations.Extract(ing)
// setup client-buffer-body-size based on annotations
clientBufferBodySizeAnnotation := ic.annotations.ClientBodyBufferSize(ing)
for _, rule := range ing.Spec.Rules { for _, rule := range ing.Spec.Rules {
host := rule.Host host := rule.Host
if host == "" { if host == "" {
@ -697,7 +694,6 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress
} }
break break
} }
loc.ClientBodyBufferSize = clientBufferBodySizeAnnotation
} }
// is a new location // is a new location
if addLoc { if addLoc {
@ -708,7 +704,6 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress
IsDefBackend: false, IsDefBackend: false,
Service: ups.Service, Service: ups.Service,
Port: ups.Port, Port: ups.Port,
ClientBodyBufferSize: clientBufferBodySizeAnnotation,
} }
mergeLocationAnnotations(loc, anns) mergeLocationAnnotations(loc, anns)
if loc.Redirect.FromToWWW { if loc.Redirect.FromToWWW {
@ -1074,9 +1069,6 @@ func (ic *GenericController) createServers(data []interface{},
} }
} }
// setup client-buffer-body-size based on annotations
clientBufferBodySizeAnnotation := ic.annotations.ClientBodyBufferSize(ing)
for _, rule := range ing.Spec.Rules { for _, rule := range ing.Spec.Rules {
host := rule.Host host := rule.Host
if host == "" { if host == "" {
@ -1096,7 +1088,6 @@ func (ic *GenericController) createServers(data []interface{},
Backend: un, Backend: un,
Proxy: ngxProxy, Proxy: ngxProxy,
Service: &api.Service{}, Service: &api.Service{},
ClientBodyBufferSize: clientBufferBodySizeAnnotation,
}, },
}, SSLPassthrough: sslpt} }, SSLPassthrough: sslpt}
} }