Merge pull request #1233 from aledbf/fix-client-bs
Fix ClientBodyBufferSize annotation
This commit is contained in:
commit
875fd778e1
1 changed files with 10 additions and 19 deletions
|
@ -633,9 +633,6 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress
|
|||
|
||||
anns := ic.annotations.Extract(ing)
|
||||
|
||||
// setup client-buffer-body-size based on annotations
|
||||
clientBufferBodySizeAnnotation := ic.annotations.ClientBodyBufferSize(ing)
|
||||
|
||||
for _, rule := range ing.Spec.Rules {
|
||||
host := rule.Host
|
||||
if host == "" {
|
||||
|
@ -697,18 +694,16 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress
|
|||
}
|
||||
break
|
||||
}
|
||||
loc.ClientBodyBufferSize = clientBufferBodySizeAnnotation
|
||||
}
|
||||
// is a new location
|
||||
if addLoc {
|
||||
glog.V(3).Infof("adding location %v in ingress rule %v/%v upstream %v", nginxPath, ing.Namespace, ing.Name, ups.Name)
|
||||
loc := &ingress.Location{
|
||||
Path: nginxPath,
|
||||
Backend: ups.Name,
|
||||
IsDefBackend: false,
|
||||
Service: ups.Service,
|
||||
Port: ups.Port,
|
||||
ClientBodyBufferSize: clientBufferBodySizeAnnotation,
|
||||
Path: nginxPath,
|
||||
Backend: ups.Name,
|
||||
IsDefBackend: false,
|
||||
Service: ups.Service,
|
||||
Port: ups.Port,
|
||||
}
|
||||
mergeLocationAnnotations(loc, anns)
|
||||
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 {
|
||||
host := rule.Host
|
||||
if host == "" {
|
||||
|
@ -1091,12 +1083,11 @@ func (ic *GenericController) createServers(data []interface{},
|
|||
Hostname: host,
|
||||
Locations: []*ingress.Location{
|
||||
{
|
||||
Path: rootLocation,
|
||||
IsDefBackend: true,
|
||||
Backend: un,
|
||||
Proxy: ngxProxy,
|
||||
Service: &api.Service{},
|
||||
ClientBodyBufferSize: clientBufferBodySizeAnnotation,
|
||||
Path: rootLocation,
|
||||
IsDefBackend: true,
|
||||
Backend: un,
|
||||
Proxy: ngxProxy,
|
||||
Service: &api.Service{},
|
||||
},
|
||||
}, SSLPassthrough: sslpt}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue