Skip to content

Commit 91eba53

Browse files
TUN-6639: Validate cyclic ingress configuration
This reverts commit d4d9a43. 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).
1 parent 065d835 commit 91eba53

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

ingress/ingress.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@ func validateIngress(ingress []config.UnvalidatedIngressRule, defaults OriginReq
232232
} else {
233233
service = newTCPOverWSService(u)
234234
}
235-
236-
if u.Hostname() == r.Hostname {
237-
return Ingress{}, fmt.Errorf("Cyclic Ingress configuration: Hostname:%s points to service:%s.", r.Hostname, r.Service)
238-
}
239235
}
240236

241237
if err := validateHostname(r, i, len(ingress)); err != nil {

ingress/ingress_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -404,16 +404,6 @@ ingress:
404404
service: https://localhost:8000
405405
- hostname: "*"
406406
service: https://localhost:8001
407-
`},
408-
wantErr: true,
409-
},
410-
{
411-
name: "Cyclic hostname definition",
412-
args: args{rawYAML: `
413-
ingress:
414-
- hostname: "test.example.com"
415-
service: https://test.example.com
416-
- service: http_status_404
417407
`},
418408
wantErr: true,
419409
},

0 commit comments

Comments
 (0)