diff options
| author | jannfis <jann@mistrust.net> | 2020-09-26 13:50:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-26 13:50:49 +0200 |
| commit | 02d580fc6805963e89632fbad3782cf5bfa1e80e (patch) | |
| tree | 9fe866767a812906fe6f05ac2ecb29d476ca86c7 /cmd | |
| parent | ef5c2099efc434947b82242eaf0b91ca275ab622 (diff) | |
feat: Allow setting log level from configmap (and environment) (#100)
* feat: Allow setting log level from configmap (and environment)
Also, updates getting started docs.
* Update manifests
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/main.go b/cmd/main.go index 0686994..f5958d9 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -331,7 +331,7 @@ func newRunCommand() *cobra.Command { runCmd.Flags().StringVar(&cfg.ClientOpts.AuthToken, "argocd-auth-token", "", "use token for authenticating to ArgoCD (unsafe - consider setting ARGOCD_TOKEN env var instead)") runCmd.Flags().BoolVar(&cfg.DryRun, "dry-run", false, "run in dry-run mode. If set to true, do not perform any changes") runCmd.Flags().DurationVar(&cfg.CheckInterval, "interval", 2*time.Minute, "interval for how often to check for updates") - runCmd.Flags().StringVar(&cfg.LogLevel, "loglevel", "info", "set the loglevel to one of trace|debug|info|warn|error") + runCmd.Flags().StringVar(&cfg.LogLevel, "loglevel", env.GetStringVal("IMAGE_UPDATER_LOGLEVEL", "info"), "set the loglevel to one of trace|debug|info|warn|error") runCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "", "full path to kubernetes client configuration, i.e. ~/.kube/config") runCmd.Flags().IntVar(&cfg.HealthPort, "health-port", 8080, "port to start the health server on, 0 to disable") runCmd.Flags().BoolVar(&once, "once", false, "run only once, same as specifying --interval=0 and --health-port=0") |
