Remove hard-coded annotation and don't use map pointers

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-12-13 02:47:11 -03:00
parent c2550930b1
commit 5c30820d1f
43 changed files with 179 additions and 173 deletions

View file

@ -42,7 +42,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-redirect-to": "goodbye.com",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -57,7 +57,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-redirect-to": "goodbye.com",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -72,7 +72,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-redirect-to": "goodbye.com",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -86,7 +86,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-body-size": "8m",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -100,7 +100,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-body-size": "15r",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -116,7 +116,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-read-timeout": "20",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -134,7 +134,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-read-timeout": "20k",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -152,7 +152,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-buffer-size": "8k",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -169,7 +169,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-request-buffering": "off",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -185,7 +185,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-next-upstream-tries": "5",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -198,7 +198,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
It("should build proxy next upstream using configmap values", func() {
annotations := map[string]string{}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.SetNginxConfigMapData(map[string]string{
@ -221,7 +221,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-cookie-path": "/one/ /",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,
@ -236,7 +236,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
"nginx.ingress.kubernetes.io/proxy-http-version": "1.0",
}
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, &annotations)
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
f.EnsureIngress(ing)
f.WaitForNginxServer(host,