Add support for IngressClass and ingress.class annotation
This commit is contained in:
parent
d4e0657991
commit
efbb3f9fc8
17 changed files with 350 additions and 53 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue