nginx-loadbalancer-kubernetes
nginx-loadbalancer-kubernetes copied to clipboard
Can `settings.Run()` (line 47) be moved with the other Go routine startups?
the go settings.Run()
call is done fairly early in main()
. The original thought was this would give the Go routine time to load the certificates before the rest of the controller bits got up and running (sketchy trying to out-clever async code!).
However, the code was restructured to not wait for the inevitable callback from the Kubernetes API on startup, but rather to Read the targets before starting the listeners. This avoids a race condition and -- possibly? -- means the startup can be moved closer to the others.
Context: cmd/nginx-loadbalancer-kubernetes/main.go:47 go settings.Run()