Merge pull request #4005 from Shopify/proxy-next-upstream-timeout
Support proxy_next_upstream_timeout
This commit is contained in:
commit
34734edc6e
9 changed files with 113 additions and 60 deletions
|
|
@ -180,8 +180,9 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
|
|||
|
||||
It("should build proxy next upstream", func() {
|
||||
annotations := map[string]string{
|
||||
"nginx.ingress.kubernetes.io/proxy-next-upstream": "error timeout http_502",
|
||||
"nginx.ingress.kubernetes.io/proxy-next-upstream-tries": "5",
|
||||
"nginx.ingress.kubernetes.io/proxy-next-upstream": "error timeout http_502",
|
||||
"nginx.ingress.kubernetes.io/proxy-next-upstream-timeout": "10",
|
||||
"nginx.ingress.kubernetes.io/proxy-next-upstream-tries": "5",
|
||||
}
|
||||
|
||||
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, "http-svc", 80, &annotations)
|
||||
|
|
@ -190,10 +191,30 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
|
|||
f.WaitForNginxServer(host,
|
||||
func(server string) bool {
|
||||
return strings.Contains(server, "proxy_next_upstream error timeout http_502;") &&
|
||||
strings.Contains(server, "proxy_next_upstream_timeout 10;") &&
|
||||
strings.Contains(server, "proxy_next_upstream_tries 5;")
|
||||
})
|
||||
})
|
||||
|
||||
It("should build proxy next upstream using configmap values", func() {
|
||||
annotations := map[string]string{}
|
||||
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, "http-svc", 80, &annotations)
|
||||
f.EnsureIngress(ing)
|
||||
|
||||
f.SetNginxConfigMapData(map[string]string{
|
||||
"proxy-next-upstream": "timeout http_502",
|
||||
"proxy-next-upstream-timeout": "53",
|
||||
"proxy-next-upstream-tries": "44",
|
||||
})
|
||||
|
||||
f.WaitForNginxServer(host,
|
||||
func(server string) bool {
|
||||
return strings.Contains(server, "proxy_next_upstream timeout http_502;") &&
|
||||
strings.Contains(server, "proxy_next_upstream_timeout 53;") &&
|
||||
strings.Contains(server, "proxy_next_upstream_tries 44;")
|
||||
})
|
||||
})
|
||||
|
||||
It("should setup proxy cookies", func() {
|
||||
annotations := map[string]string{
|
||||
"nginx.ingress.kubernetes.io/proxy-cookie-domain": "localhost example.org",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue