diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/main.go | 1 | ||||
| -rw-r--r-- | cmd/run.go | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/cmd/main.go b/cmd/main.go index 74009cb..3a4019d 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -40,6 +40,7 @@ type ImageUpdaterConfig struct { MetricsPort int RegistriesConf string AppNamePatterns []string + AppLabel string GitCommitUser string GitCommitMail string GitCommitMessage *template.Template @@ -218,6 +218,7 @@ func newRunCommand() *cobra.Command { runCmd.Flags().IntVar(&cfg.MaxConcurrency, "max-concurrency", 10, "maximum number of update threads to run concurrently") runCmd.Flags().StringVar(&cfg.ArgocdNamespace, "argocd-namespace", "", "namespace where ArgoCD runs in (current namespace by default)") runCmd.Flags().StringSliceVar(&cfg.AppNamePatterns, "match-application-name", nil, "patterns to match application name against") + runCmd.Flags().StringVar(&cfg.AppLabel, "match-application-label", "", "label to match application labels against") runCmd.Flags().BoolVar(&warmUpCache, "warmup-cache", true, "whether to perform a cache warm-up on startup") runCmd.Flags().StringVar(&cfg.GitCommitUser, "git-commit-user", env.GetStringVal("GIT_COMMIT_USER", "argocd-image-updater"), "Username to use for Git commits") runCmd.Flags().StringVar(&cfg.GitCommitMail, "git-commit-email", env.GetStringVal("GIT_COMMIT_EMAIL", "noreply@argoproj.io"), "E-Mail address to use for Git commits") @@ -259,7 +260,7 @@ func runImageUpdater(cfg *ImageUpdaterConfig, warmUp bool) (argocd.ImageUpdaterR // Get the list of applications that are allowed for updates, that is, those // applications which have correct annotation. - appList, err := argocd.FilterApplicationsForUpdate(apps, cfg.AppNamePatterns) + appList, err := argocd.FilterApplicationsForUpdate(apps, cfg.AppNamePatterns, cfg.AppLabel) if err != nil { return result, err } |
