diff options
Diffstat (limited to 'src/monitor/pkg/controller/resourcebundlestate/helpers.go')
-rw-r--r-- | src/monitor/pkg/controller/resourcebundlestate/helpers.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/monitor/pkg/controller/resourcebundlestate/helpers.go b/src/monitor/pkg/controller/resourcebundlestate/helpers.go index 5a5676f8..4d6be370 100644 --- a/src/monitor/pkg/controller/resourcebundlestate/helpers.go +++ b/src/monitor/pkg/controller/resourcebundlestate/helpers.go @@ -44,7 +44,7 @@ func listResources(cli client.Client, namespace string, LabelSelector: labels.SelectorFromSet(labelSelector), } - err := cli.List(context.TODO(), listOptions, returnData) + err := cli.List(context.TODO(), returnData, listOptions) if err != nil { log.Printf("Failed to list CRs: %v", err) return err @@ -52,3 +52,12 @@ func listResources(cli client.Client, namespace string, return nil } + +// listClusterResources lists non-namespace resources based +// on the selectors provided. +// The data is returned in the pointer to the runtime.Object +// provided as argument. +func listClusterResources(cli client.Client, + labelSelector map[string]string, returnData runtime.Object) error { + return listResources(cli, "", labelSelector, returnData) +} |