Skip to content

Commit

Permalink
Merge pull request #1233 from aledbf/fix-client-bs
Browse files Browse the repository at this point in the history
Fix ClientBodyBufferSize annotation
  • Loading branch information
aledbf authored Aug 23, 2017
2 parents 0c6f15e + 99193fc commit 875fd77
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions core/pkg/ingress/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 == "" {
Expand All @@ -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}
}
Expand Down

0 comments on commit 875fd77

Please sign in to comment.