Enable validation of ingress definitions from extensions package
This commit is contained in:
parent
fb6a03ffb4
commit
703c2d6f8e
12 changed files with 225 additions and 79 deletions
|
|
@ -53,7 +53,7 @@ func IsValid(ing *networking.Ingress) bool {
|
|||
}
|
||||
|
||||
// 2. k8s < v1.18. Check default annotation
|
||||
if !k8s.IsIngressV1Ready {
|
||||
if !k8s.IsIngressV1Beta1Ready {
|
||||
return IngressClass == DefaultClass
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,10 @@ import (
|
|||
"k8s.io/ingress-nginx/internal/ingress"
|
||||
"k8s.io/ingress-nginx/internal/ingress/annotations/class"
|
||||
"k8s.io/ingress-nginx/internal/ingress/annotations/parser"
|
||||
"k8s.io/ingress-nginx/internal/k8s"
|
||||
"k8s.io/ingress-nginx/test/e2e/framework"
|
||||
)
|
||||
|
||||
func TestStore(t *testing.T) {
|
||||
k8s.IsNetworkingIngressAvailable = true
|
||||
|
||||
//TODO: move env definition to docker image?
|
||||
os.Setenv("KUBEBUILDER_ASSETS", "/usr/local/bin")
|
||||
|
||||
|
|
|
|||
|
|
@ -301,9 +301,6 @@ func TestStatusActions(t *testing.T) {
|
|||
t.Fatalf("expected a valid Sync")
|
||||
}
|
||||
|
||||
// assume k8s >= 1.14 as the rest of the test
|
||||
k8s.IsNetworkingIngressAvailable = true
|
||||
|
||||
fk := fkSync.(statusSync)
|
||||
|
||||
// start it and wait for the election and syn actions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue