Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
fix: nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobischof committed Dec 11, 2019
1 parent 04b6af3 commit 7977f13
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions internal/kinds/loadbalancers/dynamic/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,25 +164,29 @@ vrrp_instance VI_{{ $idx }} {
{{ end }}
`))

nginxTemplate := template.Must(template.New("").Funcs(templateFuncs).Parse(`{{ $root := . }}stream { {{ range $vip := .VIPs }}{{ range $src := $vip.Transport }}
upstream {{ $src.Name }} { {{ range $dest := $src.Destinations }}{{ range $compute := computes $dest.Pool true }}
nginxTemplate := template.Must(template.New("").Funcs(templateFuncs).Parse(`{{ $root := . }}events {
worker_connections 4096; ## Default: 1024
}
stream { {{ range $vip := .VIPs }}{{ range $src := $vip.Transport }}
upstream {{ $src.Name }} { {{ range $dest := $src.Destinations }}{{ range $compute := computes $dest.Pool true }}
server {{ $compute.InternalIP }}:{{ $dest.Port }}; # {{ $dest.Pool }}{{end}}{{ end }}
}
server {
listen {{ $vip.IP }}:{{ $src.SourcePort }};
proxy_pass {{ $src.Name }};
health_check;
}
proxy_pass {{ $src.Name }};
}
{{ end }}{{ end }}}
http {
server {
listen 29999;
location /ready {
return 200;
}
listen 29999;
location /ready {
return 200;
}
}
{{ end }}{{ end }}}
}
`))

var wg sync.WaitGroup
Expand Down

0 comments on commit 7977f13

Please sign in to comment.