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
This changes introduce a new field in generator.yaml SyncedConfig, which
lets us define custom reuqueue duration. If it is not defined, the
duration will default to the DefaultSyncPeriod
Copy file name to clipboardExpand all lines: pkg/generate/code/synced.go
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -75,11 +75,17 @@ func ResourceIsSynced(
75
75
msg:=fmt.Sprintf("cannot find top level field of path '%s': %v", *condCfg.Path, err)
76
76
panic(msg)
77
77
}
78
+
notSyncedErr:=""
79
+
ifcondCfg.RequeueTime!=nil {
80
+
notSyncedErr=fmt.Sprintf("ackrequeue.NeededAfter(fmt.Errorf(\"requeing until resource status is %v\"), time.Duration(%d)*time.Second)", condCfg.In, *condCfg.RequeueTime)
81
+
} else {
82
+
notSyncedErr=fmt.Sprintf("ackrequeue.Needed(fmt.Errorf(\"requeing until resource status is %v\"))", condCfg.In)
0 commit comments