only store typeMeta and objectMeta in the gc store

This commit is contained in:
Chao Xu
2016-07-01 23:46:00 -07:00
parent d52204a1aa
commit 4d2350632c
17 changed files with 1193 additions and 38 deletions

View File

@@ -195,8 +195,12 @@ func listCollection(
}
apiResource := unversioned.APIResource{Name: gvr.Resource, Namespaced: true}
unstructuredList, err := dynamicClient.Resource(&apiResource, namespace).List(&v1.ListOptions{})
obj, err := dynamicClient.Resource(&apiResource, namespace).List(&v1.ListOptions{})
if err == nil {
unstructuredList, ok := obj.(*runtime.UnstructuredList)
if !ok {
return nil, false, fmt.Errorf("resource: %s, expected *runtime.UnstructuredList, got %#v", apiResource.Name, obj)
}
return unstructuredList, true, nil
}