Adding new runtime param delay-days that is used to control whether container is updated to new image immediately or wait until the indicated days have passed

This commit is contained in:
Peter Wilhelm 2023-12-17 19:58:33 -06:00
parent 0a14f3aa9c
commit a8279b47fe
5 changed files with 59 additions and 4 deletions

View file

@ -39,6 +39,7 @@ var (
disableContainers []string
notifier t.Notifier
timeout time.Duration
delayDays int
lifecycleHooks bool
rollingRestart bool
scope string
@ -96,6 +97,7 @@ func PreRun(cmd *cobra.Command, _ []string) {
enableLabel, _ = f.GetBool("label-enable")
disableContainers, _ = f.GetStringSlice("disable-containers")
delayDays, _ = f.GetInt("delay-days")
lifecycleHooks, _ = f.GetBool("enable-lifecycle-hooks")
rollingRestart, _ = f.GetBool("rolling-restart")
scope, _ = f.GetString("scope")
@ -364,6 +366,7 @@ func runUpdatesWithNotifications(filter t.Filter) *metrics.Metric {
NoRestart: noRestart,
Timeout: timeout,
MonitorOnly: monitorOnly,
DelayDays: delayDays,
LifecycleHooks: lifecycleHooks,
RollingRestart: rollingRestart,
LabelPrecedence: labelPrecedence,