Skip to content

Commit

Permalink
remove the default resource list limit
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
skeeey committed Jun 14, 2024
1 parent df9a3ac commit ebe14f6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/client/cloudevents/grpcsource/watcherstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,15 @@ func (m *RESTFulAPIWatcherStore) Get(namespace, name string) (*workv1.ManifestWo
func (m *RESTFulAPIWatcherStore) List(opts metav1.ListOptions) ([]*workv1.ManifestWork, error) {
works := []*workv1.ManifestWork{}

var size int32 = -1
if opts.Limit != 0 {
size = int32(opts.Limit)
}

apiRequest := m.apiClient.DefaultApi.ApiMaestroV1ResourceBundlesGet(context.Background()).
Search(fmt.Sprintf("source = '%s'", m.sourceID))
Search(fmt.Sprintf("source = '%s'", m.sourceID)).
Page(1).
Size(size)

// TODO filter works by labels

Expand Down

0 comments on commit ebe14f6

Please sign in to comment.