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

Commit

Permalink
Move printing of node addresses after reclaim loop
Browse files Browse the repository at this point in the history
Otherwise we see all the node addresses in the middle of the log.
  • Loading branch information
bboreham committed Oct 11, 2019
1 parent 3ed7894 commit 821b787
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions prog/kube-utils/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@ func main() {
}
return
}
peers, err := getKubePeers(c, false)
if err != nil {
common.Log.Fatalf("[kube-peers] Could not get peers: %v", err)
}
for _, node := range peers {
fmt.Println(node.addr)
}

if runReclaimDaemon {
// Handle SIGINT and SIGTERM
ch := make(chan os.Signal)
Expand All @@ -365,5 +357,14 @@ func main() {
registerForNodeUpdates(c, stopCh, nodeName, peerName)
<-ch
close(stopCh)
return
}

peers, err := getKubePeers(c, false)
if err != nil {
common.Log.Fatalf("[kube-peers] Could not get peers: %v", err)
}
for _, node := range peers {
fmt.Println(node.addr)
}
}

0 comments on commit 821b787

Please sign in to comment.