Add support for IngressClass and ingress.class annotation

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-04-20 17:38:50 -04:00
parent d4e0657991
commit efbb3f9fc8
17 changed files with 350 additions and 53 deletions

View file

@ -190,8 +190,7 @@ func TestCheckIngress(t *testing.T) {
}
t.Run("When the ingress class differs from nginx", func(t *testing.T) {
class := "different"
ing.Spec.IngressClassName = &class
ing.ObjectMeta.Annotations["kubernetes.io/ingress.class"] = "different"
nginx.command = testNginxTestCommand{
t: t,
err: fmt.Errorf("test error"),
@ -202,8 +201,7 @@ func TestCheckIngress(t *testing.T) {
})
t.Run("when the class is the nginx one", func(t *testing.T) {
class := "nginx"
ing.Spec.IngressClassName = &class
ing.ObjectMeta.Annotations["kubernetes.io/ingress.class"] = "nginx"
nginx.command = testNginxTestCommand{
t: t,
err: nil,