mirror of
https://github.com/coredns/coredns.git
synced 2025-12-06 18:35:11 -05:00
plugin/kubernetes: implement HasSynced() (#1155)
* plugin/kubernetes: wait until api is ready Wait for HasSynced before allowing startup to avoid startup race. Also do a small refactor in findServices() to pull a check out of the loop - only needs to be done once. * sigh
This commit is contained in:
@@ -65,7 +65,9 @@ func (p *proxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (p *apiProxy) Run() {
|
||||
p.handler.Start()
|
||||
p.Serve(p.listener)
|
||||
go func() {
|
||||
p.Serve(p.listener)
|
||||
}()
|
||||
}
|
||||
|
||||
func (p *apiProxy) Stop() {
|
||||
|
||||
Reference in New Issue
Block a user