Skip to content

Commit

Permalink
Merge pull request #1486 from aledbf/fix-configuration
Browse files Browse the repository at this point in the history
Fix overwrite of custom configuration
  • Loading branch information
aledbf authored Oct 6, 2017
2 parents 6b80dda + 50d4124 commit 48a58bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/pkg/ingress/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ func (ic *GenericController) createServers(data []*extensions.Ingress,
aliases := make(map[string]string, len(data))

bdef := ic.GetDefaultBackend()
ngxProxy := &proxy.Configuration{
ngxProxy := proxy.Configuration{
BodySize: bdef.ProxyBodySize,
ConnectTimeout: bdef.ProxyConnectTimeout,
SendTimeout: bdef.ProxySendTimeout,
Expand Down
2 changes: 1 addition & 1 deletion core/pkg/ingress/controller/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestMergeLocationAnnotations(t *testing.T) {
"Redirect": redirect.Redirect{},
"Rewrite": rewrite.Redirect{},
"Whitelist": ipwhitelist.SourceRange{},
"Proxy": &proxy.Configuration{},
"Proxy": proxy.Configuration{},
"UsePortInRedirects": true,
}

Expand Down
2 changes: 1 addition & 1 deletion core/pkg/ingress/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ type Location struct {
// Proxy contains information about timeouts and buffer sizes
// to be used in connections against endpoints
// +optional
Proxy *proxy.Configuration `json:"proxy,omitempty"`
Proxy proxy.Configuration `json:"proxy,omitempty"`
// UsePortInRedirects indicates if redirects must specify the port
// +optional
UsePortInRedirects bool `json:"usePortInRedirects"`
Expand Down
2 changes: 1 addition & 1 deletion core/pkg/ingress/types_equals.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func (l1 *Location) Equal(l2 *Location) bool {
if !(&l1.Whitelist).Equal(&l2.Whitelist) {
return false
}
if !(l1.Proxy).Equal(l2.Proxy) {
if !(&l1.Proxy).Equal(&l2.Proxy) {
return false
}
if l1.UsePortInRedirects != l2.UsePortInRedirects {
Expand Down

0 comments on commit 48a58bb

Please sign in to comment.