diff --git a/core/pkg/ingress/controller/controller.go b/core/pkg/ingress/controller/controller.go index cf4876056..84d9155be 100644 --- a/core/pkg/ingress/controller/controller.go +++ b/core/pkg/ingress/controller/controller.go @@ -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, diff --git a/core/pkg/ingress/controller/util_test.go b/core/pkg/ingress/controller/util_test.go index 3a785e5cc..3847cb2ba 100644 --- a/core/pkg/ingress/controller/util_test.go +++ b/core/pkg/ingress/controller/util_test.go @@ -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, } diff --git a/core/pkg/ingress/types.go b/core/pkg/ingress/types.go index da6d86386..52ba386f5 100644 --- a/core/pkg/ingress/types.go +++ b/core/pkg/ingress/types.go @@ -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"` diff --git a/core/pkg/ingress/types_equals.go b/core/pkg/ingress/types_equals.go index 76a3d0598..c52c6461d 100644 --- a/core/pkg/ingress/types_equals.go +++ b/core/pkg/ingress/types_equals.go @@ -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 {