mirror of
https://github.com/containrrr/watchtower.git
synced 2026-01-03 23:58:49 +01:00
feat: add flag to disable to the memory swappiness
This commit is contained in:
parent
62dd9a2648
commit
70426e1838
4 changed files with 37 additions and 10 deletions
12
cmd/root.go
12
cmd/root.go
|
|
@ -117,17 +117,19 @@ func PreRun(cmd *cobra.Command, _ []string) {
|
|||
reviveStopped, _ := f.GetBool("revive-stopped")
|
||||
removeVolumes, _ := f.GetBool("remove-volumes")
|
||||
warnOnHeadPullFailed, _ := f.GetString("warn-on-head-failure")
|
||||
disableMemorySwappiness, _ := f.GetBool("disable-memory-swappiness")
|
||||
|
||||
if monitorOnly && noPull {
|
||||
log.Warn("Using `WATCHTOWER_NO_PULL` and `WATCHTOWER_MONITOR_ONLY` simultaneously might lead to no action being taken at all. If this is intentional, you may safely ignore this message.")
|
||||
}
|
||||
|
||||
client = container.NewClient(container.ClientOptions{
|
||||
IncludeStopped: includeStopped,
|
||||
ReviveStopped: reviveStopped,
|
||||
RemoveVolumes: removeVolumes,
|
||||
IncludeRestarting: includeRestarting,
|
||||
WarnOnHeadFailed: container.WarningStrategy(warnOnHeadPullFailed),
|
||||
IncludeStopped: includeStopped,
|
||||
ReviveStopped: reviveStopped,
|
||||
RemoveVolumes: removeVolumes,
|
||||
IncludeRestarting: includeRestarting,
|
||||
DisableMemorySwappiness: disableMemorySwappiness,
|
||||
WarnOnHeadFailed: container.WarningStrategy(warnOnHeadPullFailed),
|
||||
})
|
||||
|
||||
notifier = notifications.NewNotifier(cmd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue