Merge pull request #1486 from aledbf/fix-configuration
Fix overwrite of custom configuration
This commit is contained in:
commit
48a58bbb07
4 changed files with 4 additions and 4 deletions
|
@ -885,7 +885,7 @@ func (ic *GenericController) createServers(data []*extensions.Ingress,
|
||||||
aliases := make(map[string]string, len(data))
|
aliases := make(map[string]string, len(data))
|
||||||
|
|
||||||
bdef := ic.GetDefaultBackend()
|
bdef := ic.GetDefaultBackend()
|
||||||
ngxProxy := &proxy.Configuration{
|
ngxProxy := proxy.Configuration{
|
||||||
BodySize: bdef.ProxyBodySize,
|
BodySize: bdef.ProxyBodySize,
|
||||||
ConnectTimeout: bdef.ProxyConnectTimeout,
|
ConnectTimeout: bdef.ProxyConnectTimeout,
|
||||||
SendTimeout: bdef.ProxySendTimeout,
|
SendTimeout: bdef.ProxySendTimeout,
|
||||||
|
|
|
@ -51,7 +51,7 @@ func TestMergeLocationAnnotations(t *testing.T) {
|
||||||
"Redirect": redirect.Redirect{},
|
"Redirect": redirect.Redirect{},
|
||||||
"Rewrite": rewrite.Redirect{},
|
"Rewrite": rewrite.Redirect{},
|
||||||
"Whitelist": ipwhitelist.SourceRange{},
|
"Whitelist": ipwhitelist.SourceRange{},
|
||||||
"Proxy": &proxy.Configuration{},
|
"Proxy": proxy.Configuration{},
|
||||||
"UsePortInRedirects": true,
|
"UsePortInRedirects": true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,7 @@ type Location struct {
|
||||||
// Proxy contains information about timeouts and buffer sizes
|
// Proxy contains information about timeouts and buffer sizes
|
||||||
// to be used in connections against endpoints
|
// to be used in connections against endpoints
|
||||||
// +optional
|
// +optional
|
||||||
Proxy *proxy.Configuration `json:"proxy,omitempty"`
|
Proxy proxy.Configuration `json:"proxy,omitempty"`
|
||||||
// UsePortInRedirects indicates if redirects must specify the port
|
// UsePortInRedirects indicates if redirects must specify the port
|
||||||
// +optional
|
// +optional
|
||||||
UsePortInRedirects bool `json:"usePortInRedirects"`
|
UsePortInRedirects bool `json:"usePortInRedirects"`
|
||||||
|
|
|
@ -370,7 +370,7 @@ func (l1 *Location) Equal(l2 *Location) bool {
|
||||||
if !(&l1.Whitelist).Equal(&l2.Whitelist) {
|
if !(&l1.Whitelist).Equal(&l2.Whitelist) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if !(l1.Proxy).Equal(l2.Proxy) {
|
if !(&l1.Proxy).Equal(&l2.Proxy) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if l1.UsePortInRedirects != l2.UsePortInRedirects {
|
if l1.UsePortInRedirects != l2.UsePortInRedirects {
|
||||||
|
|
Loading…
Reference in a new issue