mirror of
https://github.com/eliasstepanik/caddy-ingess.git
synced 2026-01-10 03:58:28 +00:00
Specify the ingress service port for internal hostname
Signed-off-by: Marco Vito Moscaritolo <mavimo@gmail.com>
This commit is contained in:
parent
cbba6fbf49
commit
d36dfde03f
@ -22,7 +22,7 @@ func ConvertToCaddyConfig(ings []*v1beta1.Ingress) (caddyhttp.RouteList, error)
|
||||
for _, ing := range ings {
|
||||
for _, rule := range ing.Spec.Rules {
|
||||
for _, path := range rule.HTTP.Paths {
|
||||
clusterHostName := fmt.Sprintf("%v.%v.svc.cluster.local", path.Backend.ServiceName, ing.Namespace)
|
||||
clusterHostName := fmt.Sprintf("%v.%v.svc.cluster.local:%d", path.Backend.ServiceName, ing.Namespace, path.Backend.ServicePort.IntVal)
|
||||
r := baseRoute(clusterHostName)
|
||||
|
||||
r.MatcherSets = caddyhttp.MatcherSets{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user