1
0
Fork 0

Upgrade IngressClass to use v1 over v1Beta on Kube 1.19+

This commit is contained in:
Manuel Zapf 2021-05-17 16:50:09 +02:00 committed by GitHub
parent 63ef0f1cee
commit e1e1fd640c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 135 additions and 12 deletions

View file

@ -1538,6 +1538,34 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
},
},
},
{
desc: "v19 Ingress with ingressClassv1",
serverVersion: "v1.19",
expected: &dynamic.Configuration{
TCP: &dynamic.TCPConfiguration{},
HTTP: &dynamic.HTTPConfiguration{
Middlewares: map[string]*dynamic.Middleware{},
Routers: map[string]*dynamic.Router{
"testing-bar": {
Rule: "PathPrefix(`/bar`)",
Service: "testing-service1-80",
},
},
Services: map[string]*dynamic.Service{
"testing-service1-80": {
LoadBalancer: &dynamic.ServersLoadBalancer{
PassHostHeader: Bool(true),
Servers: []dynamic.Server{
{
URL: "http://10.10.0.1:8080",
},
},
},
},
},
},
},
},
{
desc: "v19 Ingress with named port",
serverVersion: "v1.19",