Skip to content

Commit

Permalink
controllers: fixes dead-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
f41gh7 committed Jan 17, 2023
1 parent 733ee85 commit f83db10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/vmpodscrape_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (r *VMPodScrapeReconciler) Reconcile(ctx context.Context, req ctrl.Request)
}

vmAgentSync.Lock()
defer vmAgentSync.Unlock()

vmAgentInstances := &victoriametricsv1beta1.VMAgentList{}
err = r.List(ctx, vmAgentInstances, config.MustGetNamespaceListOptions())
if err != nil {
Expand Down

0 comments on commit f83db10

Please sign in to comment.