Skip to content

Commit

Permalink
Merge pull request #6500 from marquiz/devel/fixes
Browse files Browse the repository at this point in the history
clusterapi: add missing error check
  • Loading branch information
k8s-ci-robot authored Mar 15, 2024
2 parents 96b6022 + 3d94e73 commit aebba5a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,9 @@ func newMachineController(
Resource: resourceNameMachinePool,
}
machinePoolInformer = managementInformerFactory.ForResource(gvrMachinePool)
machinePoolInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{})
if _, err := machinePoolInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{}); err != nil {
return nil, fmt.Errorf("failed to add event handler for resource %q: %w", resourceNameMachinePool, err)
}

if err := machinePoolInformer.Informer().GetIndexer().AddIndexers(cache.Indexers{
machinePoolProviderIDIndex: indexMachinePoolByProviderID,
Expand Down

0 comments on commit aebba5a

Please sign in to comment.