TUN-6639: Validate cyclic ingress configuration

This reverts commit d4d9a43dd7.

We revert this change because the value this configuration addition
brings is small (it only stops an explicit cyclic configuration versus
not accounting for local hosts and ip based cycles amongst other things)
whilst the potential inconvenience it may cause is high (for example,
someone had a cyclic configuration as an ingress rule that they weren't
even using).
This commit is contained in:
Sudarsan Reddy 2022-08-09 11:14:12 +01:00
parent 065d8355c5
commit 91eba53035
2 changed files with 0 additions and 14 deletions

View File

@ -232,10 +232,6 @@ func validateIngress(ingress []config.UnvalidatedIngressRule, defaults OriginReq
} else { } else {
service = newTCPOverWSService(u) service = newTCPOverWSService(u)
} }
if u.Hostname() == r.Hostname {
return Ingress{}, fmt.Errorf("Cyclic Ingress configuration: Hostname:%s points to service:%s.", r.Hostname, r.Service)
}
} }
if err := validateHostname(r, i, len(ingress)); err != nil { if err := validateHostname(r, i, len(ingress)); err != nil {

View File

@ -404,16 +404,6 @@ ingress:
service: https://localhost:8000 service: https://localhost:8000
- hostname: "*" - hostname: "*"
service: https://localhost:8001 service: https://localhost:8001
`},
wantErr: true,
},
{
name: "Cyclic hostname definition",
args: args{rawYAML: `
ingress:
- hostname: "test.example.com"
service: https://test.example.com
- service: http_status_404
`}, `},
wantErr: true, wantErr: true,
}, },