Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/util/helper/binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func FetchResourceTemplatesByLabelSelector(
}
var objects []*unstructured.Unstructured
if err != nil || len(objectList) == 0 {
// fall back to call api server in case the cache has not been synchronized yet
// fall back to call api server
klog.Warningf("Failed to get resource template (%s/%s/%s) from cache, Error: %v. Fall back to call api server.",
resource.Kind, resource.Namespace, resource.Name, err)
unstructuredList, err := dynamicClient.Resource(gvr).Namespace(resource.Namespace).List(context.TODO(), metav1.ListOptions{LabelSelector: selector.String()})
Expand All @@ -370,8 +370,10 @@ func FetchResourceTemplatesByLabelSelector(
for i := range unstructuredList.Items {
objects = append(objects, &unstructuredList.Items[i])
}
return objects, nil
Comment thread
barbierajput378-pixel marked this conversation as resolved.
}

// Process cache objects
for i := range objectList {
unstructuredObj, err := ToUnstructured(objectList[i])
if err != nil {
Expand Down
Loading