Skip to content

Commit

Permalink
start healhprobes sync
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Büringer <buringerst@vmware.com>
  • Loading branch information
fabriziopandini committed Nov 5, 2021
1 parent b6a5752 commit 708d539
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/manager/internal.go
Expand Up @@ -425,11 +425,13 @@ func (cm *controllerManager) serveHealthProbes() {
cm.healthzStarted = true
}()

// Shutdown the server when stop is closed
<-cm.internalProceduresStop
if err := server.Shutdown(cm.shutdownCtx); err != nil {
cm.errChan <- err
}
go func() {
// Shutdown the server when stop is closed
<-cm.internalProceduresStop
if err := server.Shutdown(cm.shutdownCtx); err != nil {
cm.errChan <- err
}
}()
}

func (cm *controllerManager) Start(ctx context.Context) (err error) {
Expand Down Expand Up @@ -473,7 +475,7 @@ func (cm *controllerManager) Start(ctx context.Context) (err error) {

// Serve health probes
if cm.healthProbeListener != nil {
go cm.serveHealthProbes()
cm.serveHealthProbes()
}

// Webhooks MUST start before any cache is populated, otherwise there is a race condition
Expand Down

0 comments on commit 708d539

Please sign in to comment.