mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
chore: use WatchFuncWithContext (#25520)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
This commit is contained in:
2
gitops-engine/pkg/cache/cluster.go
vendored
2
gitops-engine/pkg/cache/cluster.go
vendored
@@ -671,7 +671,7 @@ func (c *clusterCache) watchEvents(ctx context.Context, api kube.APIResourceInfo
|
||||
}
|
||||
|
||||
w, err := watchutil.NewRetryWatcherWithContext(ctx, resourceVersion, &cache.ListWatch{
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
|
||||
res, err := resClient.Watch(ctx, options)
|
||||
if apierrors.IsNotFound(err) {
|
||||
c.stopWatching(api.GroupKind, ns)
|
||||
|
||||
Reference in New Issue
Block a user