
Builtin k8s services "kubernetes" and "kubernetes-ro" caused port conflicts with installed applications if they use ports 80 and/or 43 Change-Id: Ibf7be47d0f63dffeae7553dc3ffe9f1903ccce8f Closes-Bug: #1444213
20 lines
691 B
Cheetah
20 lines
691 B
Cheetah
defaults
|
|
option redispatch
|
|
retries 5
|
|
maxconn 2000
|
|
contimeout 5000
|
|
clitimeout 50000
|
|
srvtimeout 50000
|
|
|
|
{{range $svc := ls "/registry/services/endpoints/default"}}
|
|
{{$se := printf "/registry/services/endpoints/default/%s" $svc }}{{$ss := printf "/registry/services/specs/default/%s" $svc }}
|
|
{{$seKey := get $se}}{{$ssKey := get $ss}}{{$seJson := json $seKey.Value}}{{$ssJson := json $ssKey.Value}}{{$baseSvc := base $svc}}
|
|
{{if and (ne "kubernetes" $baseSvc) (ne "kubernetes-ro" $baseSvc)}}
|
|
listen {{$baseSvc}} 0.0.0.0:{{$ssJson.port}}
|
|
mode tcp
|
|
balance leastconn
|
|
{{range $index, $endpoint := $seJson.endpoints}}
|
|
server svr{{$index}} {{$endpoint}}{{end}}
|
|
|
|
{{end}}{{end}}
|