File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ const (
2828var (
2929 ErrTimedOut = errors .New ("execution timed out" )
3030
31+ listTimeoutSeconds = int64 (30 )
3132 executionFailedCounter = 0
3233
3334 debug = os .Getenv ("DEBUG" ) == "true"
@@ -108,9 +109,9 @@ func DoReconcile(dynamicClient dynamic.Interface, resources []*metav1.APIResourc
108109 }
109110 // List all items under the resource
110111 gvr .Resource = apiResource .Name
111- list , err := dynamicClient .Resource (gvr ).List (context .TODO (), metav1.ListOptions {})
112+ list , err := dynamicClient .Resource (gvr ).List (context .TODO (), metav1.ListOptions {TimeoutSeconds : & listTimeoutSeconds })
112113 if err != nil {
113- log .Println ( err )
114+ log .Printf ( "Error checking %s from %s: %s" , gvr . Resource , gvr . GroupVersion (), err )
114115 continue
115116 }
116117 if debug {
You can’t perform that action at this time.
0 commit comments