You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2024. It is now read-only.
func (c *Client) List(ctx context.Context, objList kclient.ObjectList, opts ...kclient.ListOption) error {
...
var ns string
if listOpts.Namespace != "" {
ns = listOpts.Namespace
}
// put objects into a map because c.objects() returns both created and updated objects, with updates coming after
// created. this will ensure the last object in is what is returned
resultObjs := make(map[string]runtime.Object)
for _, testObj := range c.objects() {
if testObj.GetNamespace() != ns {
continue
}
if a namespace is not provided in ListOptions, it is set to an empty string, which will not match testObj.GetNamespace(), resulting in no items fetched.
if a namespace is not provided in ListOptions, it is set to an empty string, which will not match testObj.GetNamespace(), resulting in no items fetched.