Fix fenced server status computation

Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
Kevin Pollet 2024-12-20 11:26:04 +01:00 committed by GitHub
parent 68a8650297
commit a29628fa2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 113 additions and 9 deletions

View file

@ -1534,6 +1534,46 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
},
},
},
{
desc: "Ingress with endpoint conditions",
expected: &dynamic.Configuration{
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: pointer(true),
ResponseForwarding: &dynamic.ResponseForwarding{
FlushInterval: ptypes.Duration(100 * time.Millisecond),
},
Servers: []dynamic.Server{
{
URL: "http://10.10.0.1:8080",
},
{
URL: "http://10.10.0.2:8080",
},
{
URL: "http://10.10.0.3:8080",
Fenced: true,
},
{
URL: "http://10.10.0.4:8080",
Fenced: true,
},
},
},
},
},
},
},
},
}
for _, test := range testCases {