Skip to content

Commit

Permalink
Remove ProxyPassParams setting (kubernetes#2185)
Browse files Browse the repository at this point in the history
This reverts commit c0fecd5
  • Loading branch information
antoineco authored and aledbf committed Mar 8, 2018
1 parent 86a3a63 commit 5ba0f4e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
11 changes: 1 addition & 10 deletions internal/ingress/annotations/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type Config struct {
CookieDomain string `json:"cookieDomain"`
CookiePath string `json:"cookiePath"`
NextUpstream string `json:"nextUpstream"`
PassParams string `json:"passParams"`
ProxyRedirectFrom string `json:"proxyRedirectFrom"`
ProxyRedirectTo string `json:"proxyRedirectTo"`
RequestBuffering string `json:"requestBuffering"`
Expand Down Expand Up @@ -72,9 +71,6 @@ func (l1 *Config) Equal(l2 *Config) bool {
if l1.NextUpstream != l2.NextUpstream {
return false
}
if l1.PassParams != l2.PassParams {
return false
}
if l1.RequestBuffering != l2.RequestBuffering {
return false
}
Expand Down Expand Up @@ -145,11 +141,6 @@ func (a proxy) Parse(ing *extensions.Ingress) (interface{}, error) {
nu = defBackend.ProxyNextUpstream
}

pp, err := parser.GetStringAnnotation("proxy-pass-params", ing)
if err != nil || pp == "" {
pp = defBackend.ProxyPassParams
}

rb, err := parser.GetStringAnnotation("proxy-request-buffering", ing)
if err != nil || rb == "" {
rb = defBackend.ProxyRequestBuffering
Expand All @@ -170,5 +161,5 @@ func (a proxy) Parse(ing *extensions.Ingress) (interface{}, error) {
pb = defBackend.ProxyBuffering
}

return &Config{bs, ct, st, rt, bufs, cd, cp, nu, pp, prf, prt, rb, pb}, nil
return &Config{bs, ct, st, rt, bufs, cd, cp, nu, prf, prt, rb, pb}, nil
}
8 changes: 0 additions & 8 deletions internal/ingress/annotations/proxy/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func (m mockBackend) GetDefaultBackend() defaults.Backend {
ProxyBufferSize: "10k",
ProxyBodySize: "3k",
ProxyNextUpstream: "error",
ProxyPassParams: "nocanon keepalive=On",
ProxyRequestBuffering: "on",
ProxyBuffering: "off",
}
Expand All @@ -93,7 +92,6 @@ func TestProxy(t *testing.T) {
data[parser.GetAnnotationWithPrefix("proxy-buffer-size")] = "1k"
data[parser.GetAnnotationWithPrefix("proxy-body-size")] = "2k"
data[parser.GetAnnotationWithPrefix("proxy-next-upstream")] = "off"
data[parser.GetAnnotationWithPrefix("proxy-pass-params")] = "smax=5 max=10"
data[parser.GetAnnotationWithPrefix("proxy-request-buffering")] = "off"
data[parser.GetAnnotationWithPrefix("proxy-buffering")] = "on"
ing.SetAnnotations(data)
Expand Down Expand Up @@ -124,9 +122,6 @@ func TestProxy(t *testing.T) {
if p.NextUpstream != "off" {
t.Errorf("expected off as next-upstream but returned %v", p.NextUpstream)
}
if p.PassParams != "smax=5 max=10" {
t.Errorf("expected \"smax=5 max=10\" as pass-params but returned \"%v\"", p.PassParams)
}
if p.RequestBuffering != "off" {
t.Errorf("expected off as request-buffering but returned %v", p.RequestBuffering)
}
Expand Down Expand Up @@ -167,9 +162,6 @@ func TestProxyWithNoAnnotation(t *testing.T) {
if p.NextUpstream != "error" {
t.Errorf("expected error as next-upstream but returned %v", p.NextUpstream)
}
if p.PassParams != "nocanon keepalive=On" {
t.Errorf("expected \"nocanon keepalive=On\" as pass-params but returned \"%v\"", p.PassParams)
}
if p.RequestBuffering != "on" {
t.Errorf("expected on as request-buffering but returned %v", p.RequestBuffering)
}
Expand Down
3 changes: 0 additions & 3 deletions internal/ingress/defaults/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ type Backend struct {
// http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
ProxyNextUpstream string `json:"proxy-next-upstream"`

// Parameters for proxy-pass directive (eg. Apache web server).
ProxyPassParams string `json:"proxy-pass-params"`

// Sets the original text that should be changed in the "Location" and "Refresh" header fields of a proxied server response.
// http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect
// Default: off
Expand Down

0 comments on commit 5ba0f4e

Please sign in to comment.