diff options
| author | Jan Pieper <kontakt@jan-pieper.info> | 2021-11-10 08:16:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-10 08:16:49 +0100 |
| commit | 934f7c5e735e89572dc93a33a33a68ff43522625 (patch) | |
| tree | 6fa930b2eb1567e611bc19981402b6e21212b7c5 /cmd | |
| parent | 226e73160ae5ac7ddf625010620e52428d610528 (diff) | |
fix: Rename flag to specify registries config path (#290) (#295)
Signed-off-by: Jan Pieper <kontakt@jan-pieper.info>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/test.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/cmd/test.go b/cmd/test.go index 74e873b..3ebf394 100644 --- a/cmd/test.go +++ b/cmd/test.go @@ -15,17 +15,17 @@ import ( func newTestCommand() *cobra.Command { var ( - semverConstraint string - strategy string - registriesConf string - logLevel string - allowTags string - credentials string - kubeConfig string - disableKubernetes bool - ignoreTags []string - disableKubeEvents bool - rateLimit int + semverConstraint string + strategy string + registriesConfPath string + logLevel string + allowTags string + credentials string + kubeConfig string + disableKubernetes bool + ignoreTags []string + disableKubeEvents bool + rateLimit int ) var runCmd = &cobra.Command{ Use: "test IMAGE", @@ -89,8 +89,8 @@ argocd-image-updater test nginx --allow-tags '^1.19.\d+(\-.*)*$' --update-strate AddField("image_name", img.ImageName). Infof("getting image") - if registriesConf != "" { - if err := registry.LoadRegistryConfiguration(registriesConf, false); err != nil { + if registriesConfPath != "" { + if err := registry.LoadRegistryConfiguration(registriesConfPath, false); err != nil { log.Fatalf("could not load registries configuration: %v", err) } } @@ -163,7 +163,7 @@ argocd-image-updater test nginx --allow-tags '^1.19.\d+(\-.*)*$' --update-strate runCmd.Flags().StringVar(&allowTags, "allow-tags", "", "only consider tags in registry that satisfy the match function") runCmd.Flags().StringArrayVar(&ignoreTags, "ignore-tags", nil, "ignore tags in registry that match given glob pattern") runCmd.Flags().StringVar(&strategy, "update-strategy", "semver", "update strategy to use, one of: semver, latest)") - runCmd.Flags().StringVar(®istriesConf, "registries-conf", "", "path to registries configuration") + runCmd.Flags().StringVar(®istriesConfPath, "registries-conf-path", "", "path to registries configuration") runCmd.Flags().StringVar(&logLevel, "loglevel", "debug", "log level to use (one of trace, debug, info, warn, error)") runCmd.Flags().BoolVar(&disableKubernetes, "disable-kubernetes", false, "whether to disable the Kubernetes client") runCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "", "path to your Kubernetes client configuration") |
