Skip to content

Commit 0c91d7c

Browse files
committed
Allow for configuring the reconcileAfter value
1 parent 3b389b6 commit 0c91d7c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cmd/app/app.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func NewCommand(ctx context.Context) *cobra.Command {
5959
return fmt.Errorf("failed to build kubernetes rest config: %s", err)
6060
}
6161

62-
log.Infof("flag --test-all-containers=%t %s", opts.DefaultTestAll, defaultTestAllInfoMsg)
62+
log.Warnf("flag --test-all-containers=%t %s", opts.DefaultTestAll, defaultTestAllInfoMsg)
6363

6464
mgr, err := ctrl.NewManager(restConfig, ctrl.Options{
6565
LeaderElection: false,
@@ -115,6 +115,7 @@ func NewCommand(ctx context.Context) *cobra.Command {
115115
client,
116116
mgr.GetClient(),
117117
log,
118+
opts.RequeueDuration,
118119
opts.DefaultTestAll,
119120
)
120121

cmd/app/options.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ type Options struct {
6767
MetricsServingAddress string
6868
DefaultTestAll bool
6969
CacheTimeout time.Duration
70+
RequeueDuration time.Duration
7071
LogLevel string
7172

7273
PprofBindAddress string
@@ -124,6 +125,10 @@ func (o *Options) addAppFlags(fs *pflag.FlagSet) {
124125
"The time for an image version in the cache to be considered fresh. Images "+
125126
"will be rechecked after this interval.")
126127

128+
fs.DurationVarP(&o.RequeueDuration,
129+
"requeue-duration", "r", time.Hour,
130+
"The time a pod will be re-checked for new versions/tags")
131+
127132
fs.StringVarP(&o.LogLevel,
128133
"log-level", "v", "info",
129134
"Log level (debug, info, warn, error, fatal, panic).")

0 commit comments

Comments
 (0)