Skip to content

Commit

Permalink
Add placeholder for AddEventHandler return values
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
  • Loading branch information
ncdc authored and sttts committed May 19, 2023
1 parent 999b40f commit 6c9a772
Show file tree
Hide file tree
Showing 50 changed files with 102 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewLogicalClusterDeletionMonitor(
stopFunc: stopFunc,
}

logicalClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = logicalClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
DeleteFunc: func(obj interface{}) {
m.enqueue(obj)
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/dns/plugin/nsmap/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func StartWatcher(ctx context.Context, callback OnUpdateFn) error {

informer := factory.Core().V1().ConfigMaps().Informer()

informer.AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = informer.AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
callback(ctx, obj.(*corev1.ConfigMap))
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/informer/informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func (d *GenericDiscoveringDynamicSharedInformerFactory[Informer, Lister, Generi
// Definitely need to create it
inf = d.newInformer(gvr, resyncPeriod, indexers)

inf.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = inf.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: d.filterFunc,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand Down Expand Up @@ -908,7 +908,7 @@ func (s *crdGVRSource) Subscribe() <-chan struct{} {
}

// When CRDs change, send a notification that we might need to add/remove informers.
s.crdInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = s.crdInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
if crdIsEstablished(obj) {
notifyChange()
Expand Down
6 changes: 3 additions & 3 deletions pkg/proxy/index/index_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func NewController(
}),
}

shardInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = shardInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
shard := obj.(*corev1alpha1.Shard)
c.state.UpsertShard(shard.Name, shard.Spec.BaseURL)
Expand Down Expand Up @@ -221,7 +221,7 @@ func (c *Controller) process(ctx context.Context, key string) error {
}

wsInformer := tenancyv1alpha1informers.NewWorkspaceClusterInformer(client, resyncPeriod, nil)
wsInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = wsInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
ws := obj.(*tenancyv1alpha1.Workspace)
c.state.UpsertWorkspace(shard.Name, ws)
Expand All @@ -240,7 +240,7 @@ func (c *Controller) process(ctx context.Context, key string) error {
})

twInformer := corev1alpha1informers.NewLogicalClusterClusterInformer(client, resyncPeriod, nil)
twInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = twInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
logicalCluster := obj.(*corev1alpha1.LogicalCluster)
c.state.UpsertLogicalCluster(shard.Name, logicalCluster)
Expand Down
14 changes: 7 additions & 7 deletions pkg/reconciler/apis/apibinding/apibinding_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func NewController(
})

// APIBinding handlers
apiBindingInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiBindingInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueueAPIBinding(objOrTombstone[*apisv1alpha1.APIBinding](obj), logger, "") },
UpdateFunc: func(_, obj interface{}) {
c.enqueueAPIBinding(objOrTombstone[*apisv1alpha1.APIBinding](obj), logger, "")
Expand All @@ -189,7 +189,7 @@ func NewController(
})

// CRD handlers
crdInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = crdInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
crd := obj.(*apiextensionsv1.CustomResourceDefinition)
return logicalcluster.From(crd) == SystemBoundCRDsClusterName
Expand All @@ -215,19 +215,19 @@ func NewController(
})

// APIExport handlers
apiExportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiExportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueueAPIExport(objOrTombstone[*apisv1alpha1.APIExport](obj), logger, "") },
UpdateFunc: func(_, obj interface{}) { c.enqueueAPIExport(objOrTombstone[*apisv1alpha1.APIExport](obj), logger, "") },
DeleteFunc: func(obj interface{}) { c.enqueueAPIExport(objOrTombstone[*apisv1alpha1.APIExport](obj), logger, "") },
})
globalAPIExportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = globalAPIExportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueueAPIExport(objOrTombstone[*apisv1alpha1.APIExport](obj), logger, "") },
UpdateFunc: func(_, obj interface{}) { c.enqueueAPIExport(objOrTombstone[*apisv1alpha1.APIExport](obj), logger, "") },
DeleteFunc: func(obj interface{}) { c.enqueueAPIExport(objOrTombstone[*apisv1alpha1.APIExport](obj), logger, "") },
})

// APIResourceSchema handlers
apiResourceSchemaInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiResourceSchemaInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueAPIResourceSchema(objOrTombstone[*apisv1alpha1.APIResourceSchema](obj), logger, "")
},
Expand All @@ -238,7 +238,7 @@ func NewController(
c.enqueueAPIResourceSchema(objOrTombstone[*apisv1alpha1.APIResourceSchema](obj), logger, "")
},
})
globalAPIResourceSchemaInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = globalAPIResourceSchemaInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueAPIResourceSchema(objOrTombstone[*apisv1alpha1.APIResourceSchema](obj), logger, "")
},
Expand All @@ -251,7 +251,7 @@ func NewController(
})

// APIConversion handlers
apiConversionInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiConversionInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueAPIConversion(objOrTombstone[*apisv1alpha1.APIConversion](obj), logger)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func NewController(
commit: committer.NewCommitter[*APIBinding, Patcher, *APIBindingSpec, *APIBindingStatus](kcpClusterClient.ApisV1alpha1().APIBindings()),
}

apiBindingInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = apiBindingInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
switch obj := obj.(type) {
case *apisv1alpha1.APIBinding:
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/apis/apiexport/apiexport_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func NewController(
},
)

apiExportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiExportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueAPIExport(obj.(*apisv1alpha1.APIExport))
},
Expand All @@ -141,7 +141,7 @@ func NewController(
},
})

secretInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = secretInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueSecret(obj.(*corev1.Secret))
},
Expand All @@ -153,7 +153,7 @@ func NewController(
},
})

globalShardInformer.Informer().AddEventHandler(
_, _ = globalShardInformer.Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueAllAPIExports(obj.(*corev1alpha1.Shard))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func NewController(
indexAPIExportEndpointSliceByAPIExport: indexAPIExportEndpointSliceByAPIExportFunc,
})

apiExportEndpointSliceClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiExportEndpointSliceClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueAPIExportEndpointSlice(obj)
},
Expand All @@ -120,7 +120,7 @@ func NewController(
},
})

globalAPIExportClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = globalAPIExportClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueAPIExportEndpointSlicesForAPIExport(obj)
},
Expand All @@ -129,7 +129,7 @@ func NewController(
},
})

globalShardClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = globalShardClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueueAllAPIExportEndpointSlices(obj)
},
Expand All @@ -144,7 +144,7 @@ func NewController(
},
)

partitionClusterInformer.Informer().AddEventHandler(
_, _ = partitionClusterInformer.Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
c.enqueuePartition(obj)
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/apis/apiresource/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewController(
crdLister: crdInformer.Lister(),
}

negotiatedAPIResourceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = negotiatedAPIResourceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueue(addHandlerAction, nil, obj) },
UpdateFunc: func(oldObj, obj interface{}) { c.enqueue(updateHandlerAction, oldObj, obj) },
DeleteFunc: func(obj interface{}) { c.enqueue(deleteHandlerAction, nil, obj) },
Expand All @@ -89,7 +89,7 @@ func NewController(
return nil, fmt.Errorf("failed to add indexer for NegotiatedAPIResource: %w", err)
}

apiResourceImportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiResourceImportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueue(addHandlerAction, nil, obj) },
UpdateFunc: func(oldObj, obj interface{}) { c.enqueue(updateHandlerAction, oldObj, obj) },
DeleteFunc: func(obj interface{}) { c.enqueue(deleteHandlerAction, nil, obj) },
Expand All @@ -105,7 +105,7 @@ func NewController(
return nil, fmt.Errorf("failed to add indexer for APIResourceImport: %w", err)
}

crdInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = crdInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueue(addHandlerAction, nil, obj) },
UpdateFunc: func(oldObj, obj interface{}) { c.enqueue(updateHandlerAction, oldObj, obj) },
DeleteFunc: func(obj interface{}) { c.enqueue(deleteHandlerAction, nil, obj) },
Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/apis/crdcleanup/crdcleanup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func NewController(
},
)

crdInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = crdInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
crd := obj.(*apiextensionsv1.CustomResourceDefinition)
return logicalcluster.From(crd) == apibinding.SystemBoundCRDsClusterName
Expand All @@ -96,7 +96,7 @@ func NewController(
},
})

apiBindingInformer.Informer().AddEventHandler(
_, _ = apiBindingInformer.Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
UpdateFunc: func(oldObj, newObj interface{}) {
c.enqueueFromAPIBinding(oldObj.(*apisv1alpha1.APIBinding), newObj.(*apisv1alpha1.APIBinding))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ func NewController(
indexers.APIBindingsByAPIExport: indexers.IndexAPIBindingByAPIExport,
})

apiExportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiExportInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueueAPIExport(obj, logger) },
UpdateFunc: func(_, obj interface{}) { c.enqueueAPIExport(obj, logger) },
})

apiBindingInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiBindingInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueueAPIBinding(obj, logger, "") },
UpdateFunc: func(_, obj interface{}) { c.enqueueAPIBinding(obj, logger, "") },
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func NewApiExportIdentityProviderController(
},
}

globalAPIExportInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = globalAPIExportInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
key, err := kcpcache.DeletionHandlingMetaClusterNamespaceKeyFunc(obj)
if err != nil {
Expand All @@ -101,7 +101,7 @@ func NewApiExportIdentityProviderController(
},
})

configMapInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = configMapInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
key, err := kcpcache.DeletionHandlingMetaClusterNamespaceKeyFunc(obj)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func NewController(
indexers.ByLogicalClusterPathAndName: indexers.IndexByLogicalClusterPathAndName,
})

apiBindingInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = apiBindingInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueueAPIBinding(obj, logger) },
UpdateFunc: func(_, newObj interface{}) {
c.enqueueAPIBinding(newObj, logger)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func NewController(
c.EnqueueLogicalCluster(cluster, "reason", "APIExport changed", "apiexport", export.Name)
}

apiExportInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = apiExportInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: replication.IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func NewController(
labelclusterroles.ClusterRoleBindingByClusterRoleName: labelclusterroles.IndexClusterRoleBindingByClusterRoleName,
})

clusterRoleBindingInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = clusterRoleBindingInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: replication.IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand All @@ -102,7 +102,7 @@ func NewController(
},
})

clusterRoleInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = clusterRoleInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: replication.IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func NewController(
ClusterRoleBindingByClusterRoleName: IndexClusterRoleBindingByClusterRoleName,
})

clusterRoleInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = clusterRoleInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: replication.IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand All @@ -101,7 +101,7 @@ func NewController(
},
})

clusterRoleBindingInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = clusterRoleBindingInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: replication.IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func NewController(
commit: committer.NewCommitter[*LogicalCluster, Patcher, *LogicalClusterSpec, *LogicalClusterStatus](kcpClusterClient.CoreV1alpha1().LogicalClusters()),
}

logicalClusterInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = logicalClusterInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: replication.IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/cache/replication/replication_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func NewController(
// shadow gvr to get the right value in the closure
gvr := gvr

info.local.AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = info.local.AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueueObject(obj, gvr) },
Expand All @@ -165,7 +165,7 @@ func NewController(
},
})

info.global.AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = info.global.AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: IsNoSystemClusterName, // not really needed, but cannot harm
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueueCacheObject(obj, gvr) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewController(

logger := logging.WithReconciler(klog.FromContext(ctx), controllerName)

informer.AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = informer.AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
enqueue(obj, c.upstreamViewQueue, logger.WithValues("view", "upstream"))
enqueue(obj, c.syncerViewQueue, logger.WithValues("view", "syncer"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func NewController(
logicalClusterLister: logicalClusterInformer.Lister(),
commit: committer.NewCommitter[*corev1alpha1.LogicalCluster, corev1alpha1client.LogicalClusterInterface, *corev1alpha1.LogicalClusterSpec, *corev1alpha1.LogicalClusterStatus](kcpClusterClient.CoreV1alpha1().LogicalClusters()),
}
logicalClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
_, _ = logicalClusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { c.enqueue(obj) },
UpdateFunc: func(obj, _ interface{}) { c.enqueue(obj) },
DeleteFunc: func(obj interface{}) { c.enqueue(obj) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func NewController(
commit: committer.NewCommitter[*LogicalCluster, Patcher, *LogicalClusterSpec, *LogicalClusterStatus](kcpClusterClient.CoreV1alpha1().LogicalClusters()),
}

logicalClusterInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = logicalClusterInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: func(obj interface{}) bool {
switch obj := obj.(type) {
case *corev1alpha1.LogicalCluster:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func NewController(
)

// requeue all ClusterRoles when a LogicalCluster changes replication status
logicalClusterInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = logicalClusterInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: replication.IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func NewController(
)

// requeue all ClusterRoleBindings when a LogicalCluster changes replication status
logicalClusterInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
_, _ = logicalClusterInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
FilterFunc: replication.IsNoSystemClusterName,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
Expand Down
Loading

0 comments on commit 6c9a772

Please sign in to comment.