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

@ -54,10 +54,10 @@ func TestIsValidClass(t *testing.T) {
},
}
data := map[string]string{}
ing.SetAnnotations(data)
for _, test := range tests {
if test.ingress != "" {
ing.Spec.IngressClassName = &test.ingress
}
ing.Annotations[IngressKey] = test.ingress
IngressClass = test.controller
DefaultClass = test.defClass