Accept backend protocol on any case (#10460)

This commit is contained in:
Ricardo Katz 2023-09-28 22:20:42 -03:00 committed by GitHub
parent ae86c07298
commit 1fbfcbd907
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 1 deletions

View file

@ -48,6 +48,21 @@ var _ = framework.DescribeAnnotation("backend-protocol", func() {
})
})
ginkgo.It("should set backend protocol to https:// and use proxy_pass with lowercase annotation", func() {
host := backendProtocolHost
annotations := map[string]string{
"nginx.ingress.kubernetes.io/backend-protocol": "https",
}
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 https://upstream_balancer;")
})
})
ginkgo.It("should set backend protocol to $scheme:// and use proxy_pass", func() {
host := backendProtocolHost
annotations := map[string]string{