fix non tls ingress still able to listen on a https port
This commit is contained in:
parent
eb1303da02
commit
c5cadcc120
2 changed files with 7 additions and 1 deletions
|
@ -1413,6 +1413,12 @@ func buildHTTPSListener(t, s interface{}) string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, server := range tc.Servers {
|
||||||
|
if server.Hostname == hostname && server.SSLCert == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
co := commonListenOptions(&tc, hostname)
|
co := commonListenOptions(&tc, hostname)
|
||||||
|
|
||||||
addrV4 := []string{""}
|
addrV4 := []string{""}
|
||||||
|
|
|
@ -62,7 +62,7 @@ var _ = framework.IngressNginxDescribe("[Lua] dynamic certificates", func() {
|
||||||
_, err = f.KubeClientSet.NetworkingV1().Ingresses(f.Namespace).Update(context.TODO(), ing, metav1.UpdateOptions{})
|
_, err = f.KubeClientSet.NetworkingV1().Ingresses(f.Namespace).Update(context.TODO(), ing, metav1.UpdateOptions{})
|
||||||
assert.Nil(ginkgo.GinkgoT(), err)
|
assert.Nil(ginkgo.GinkgoT(), err)
|
||||||
|
|
||||||
time.Sleep(waitForLuaSync)
|
time.Sleep(1 * time.Hour)
|
||||||
|
|
||||||
ensureHTTPSRequest(f, f.GetURL(framework.HTTPS), host, host)
|
ensureHTTPSRequest(f, f.GetURL(framework.HTTPS), host, host)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue