auto backend protocol for HTTP/HTTPS (#6985)
* add auto backend protocol for HTTP/HTTPS * e2e test for AUTO_HTTP backend protocol * unit test for AUTO_HTTP backend protocol Co-authored-by: Luca Del Monte <luca.delmonte5@gmail.com>
This commit is contained in:
parent
b1f9f83810
commit
a327a809d9
4 changed files with 96 additions and 16 deletions
|
|
@ -46,6 +46,21 @@ var _ = framework.DescribeAnnotation("backend-protocol", func() {
|
|||
})
|
||||
})
|
||||
|
||||
ginkgo.It("should set backend protocol to $scheme:// and use proxy_pass", func() {
|
||||
host := "backendprotocol.foo.com"
|
||||
annotations := map[string]string{
|
||||
"nginx.ingress.kubernetes.io/backend-protocol": "AUTO_HTTP",
|
||||
}
|
||||
|
||||
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, annotations)
|
||||
f.EnsureIngress(ing)
|
||||
|
||||
f.WaitForNginxServer(host,
|
||||
func(server string) bool {
|
||||
return strings.Contains(server, "proxy_pass $scheme://upstream_balancer;")
|
||||
})
|
||||
})
|
||||
|
||||
ginkgo.It("should set backend protocol to grpc:// and use grpc_pass", func() {
|
||||
host := "backendprotocol.foo.com"
|
||||
annotations := map[string]string{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue