feat(docs): add template preview (#1777)

feat(filters): Allow explicitly filtering containers by name.

Resolves #1566B
This commit is contained in:
nils måsén 2023-10-02 16:11:04 +02:00 committed by Rodrigo Damazio Bovendorp
parent 9b28fbc24d
commit 9ffb9ba8e7
5 changed files with 104 additions and 5 deletions

View file

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"os"
"regexp"
"strings"
"time"
@ -85,6 +86,13 @@ func RegisterSystemFlags(rootCmd *cobra.Command) {
envBool("WATCHTOWER_LABEL_ENABLE"),
"Watch containers where the com.centurylinklabs.watchtower.enable label is true")
flags.StringSliceP(
"disable-containers",
"x",
// Due to issue spf13/viper#380, can't use viper.GetStringSlice:
regexp.MustCompile("[, ]+").Split(viper.GetString("WATCHTOWER_DISABLE_CONTAINERS"), -1),
"Comma-separated list of containers to explicitly exclude from watching.")
flags.StringP(
"log-format",
"l",