respond with 503 when there are no endpoints

* related to:
  * https://github.com/kubernetes/ingress-nginx/issues/3070
  * https://github.com/kubernetes/ingress-nginx/issues/3335
* add a 503 test
  * test a service that starts out empty
    (a.k.a. ingress-nginx controller (re-)start)
  * test scaling up (should route traffic accordingly)
  * test scaling down to empty service
  * use custom deployments for scaling test.
* provide a fix by updating the lua table (cache) of the configured backends
  to unset the backend if there are no endpoints available.
This commit is contained in:
Tim Reddehase 2018-12-20 14:48:03 +01:00
parent d4d25f6fb4
commit 018a1e4d94
4 changed files with 94 additions and 8 deletions

View file

@ -57,7 +57,7 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
})
It("picks up the certificate when we add TLS spec to existing ingress", func() {
ensureIngress(f, host)
ensureIngress(f, host, "http-svc")
ing, err := f.KubeClientSet.ExtensionsV1beta1().Ingresses(f.IngressController.Namespace).Get(host, metav1.GetOptions{})
Expect(err).ToNot(HaveOccurred())