Skip to content

replicate cache hanging on configmaps #142

@mvaalexp

Description

@mvaalexp

I am using a fairly large cluster with some configmaps that are constantly updating. When I add the --replicate=v1/configmaps flag to kube-mgmt, the watch seems to hang for hours (I am seeing around 3+ hours).

The only conclusion I can come to is that because of the constantly updating configmaps, the ResultChan is not ever returning?

w, err := resource.Watch(context.TODO(), metav1.ListOptions{
ResourceVersion: resourceVersion,
})
if err != nil {
return errKubernetes{fmt.Errorf("watch: %w", err)}
}
defer w.Stop()
ch := w.ResultChan()
for {
select {
case evt := <-ch:
switch evt.Type {
case watch.Added:
err := s.syncAdd(evt.Object)
if err != nil {
return errOPA{fmt.Errorf("add event: %w", err)}
}
case watch.Modified:
err := s.syncAdd(evt.Object)
if err != nil {
return errOPA{fmt.Errorf("modify event: %w", err)}
}
case watch.Deleted:
err := s.syncRemove(evt.Object)
if err != nil {
return errOPA{fmt.Errorf("delete event: %w", err)}
}
case watch.Error:
return errKubernetes{fmt.Errorf("error event: %v", evt.Object)}
default:
return errChannelClosed{}
}
case <-quit:
return nil
}
}

The only other thing I can think is that because of the throttling issue we have on the cluster and the channel is failing out.

I0426 16:36:41.173364   49052 request.go:665] Waited for 1.189022768s due to client-side throttling, not priority and fairness, request: GET:

Any help here would be appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions