mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-29 05:08:48 +01:00
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:
parent
0a14f3aa9c
commit
a8279b47fe
5 changed files with 59 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue