diff --git a/pkg/registry/core/service/ipallocator/controller/repair.go b/pkg/registry/core/service/ipallocator/controller/repair.go index de323fbc776..e06ef571ff1 100644 --- a/pkg/registry/core/service/ipallocator/controller/repair.go +++ b/pkg/registry/core/service/ipallocator/controller/repair.go @@ -105,7 +105,7 @@ func (c *Repair) runOnce() error { // the service collection. The caching layer keeps per-collection RVs, // and this is proper, since in theory the collections could be hosted // in separate etcd (or even non-etcd) instances. - list, err := c.registry.ListServices(ctx, nil) + list, err := c.registry.ListServices(ctx, &api.ListOptions{}) if err != nil { return fmt.Errorf("unable to refresh the service IP block: %v", err) } diff --git a/pkg/registry/core/service/portallocator/controller/repair.go b/pkg/registry/core/service/portallocator/controller/repair.go index 4d5cb51914d..5ad15c3294f 100644 --- a/pkg/registry/core/service/portallocator/controller/repair.go +++ b/pkg/registry/core/service/portallocator/controller/repair.go @@ -94,7 +94,7 @@ func (c *Repair) runOnce() error { // the service collection. The caching layer keeps per-collection RVs, // and this is proper, since in theory the collections could be hosted // in separate etcd (or even non-etcd) instances. - list, err := c.registry.ListServices(ctx, nil) + list, err := c.registry.ListServices(ctx, &api.ListOptions{}) if err != nil { return fmt.Errorf("unable to refresh the port block: %v", err) } diff --git a/pkg/registry/generic/registry/store.go b/pkg/registry/generic/registry/store.go index ea0f4a8c187..85d1f2733a0 100644 --- a/pkg/registry/generic/registry/store.go +++ b/pkg/registry/generic/registry/store.go @@ -203,7 +203,8 @@ func (e *Store) List(ctx api.Context, options *api.ListOptions) (runtime.Object, // ListPredicate returns a list of all the items matching m. func (e *Store) ListPredicate(ctx api.Context, p storage.SelectionPredicate, options *api.ListOptions) (runtime.Object, error) { if options == nil { - options = &api.ListOptions{ResourceVersion: "0"} + // By default we should serve the request from etcd. + options = &api.ListOptions{ResourceVersion: ""} } list := e.NewListFunc() if name, ok := p.MatchesSingle(); ok {