diff --git a/cmd/root.go b/cmd/root.go index 2aa2806..7551507 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -71,7 +71,7 @@ func init() { rootCmd.PersistentFlags().String("context", "", "A context to use in the kubeconfig.") viper.BindPFlag("context", rootCmd.PersistentFlags().Lookup("context")) - rootCmd.PersistentFlags().String("helm-version", "3", "Helm version in the current cluster (2|3|auto)") + rootCmd.PersistentFlags().String("helm-version", "3", "DEPRECATED: Only helm 3 usage in the future. Helm version in the current cluster (2|3|auto)") viper.BindPFlag("helm-version", rootCmd.PersistentFlags().Lookup("helm-version")) rootCmd.PersistentFlags().Bool("wide", false, "Output chart name and namespace") @@ -176,6 +176,9 @@ var clusterCmd = &cobra.Command{ Short: "Find out-of-date deployed releases.", Long: "Find deployed helm releases that have updated charts available in chart repos", Run: func(cmd *cobra.Command, args []string) { + if viper.GetString("helm-version") != "3" { + klog.Warning("DEPRECATION: --helm-version explicitly set to either 'auto' or '2'. In v3 of Nova, Helm 2 support will be removed.") + } h := nova_helm.NewHelm(viper.GetString("helm-version"), viper.GetString("context")) klog.V(4).Infof("Settings: %v", viper.AllSettings()) @@ -220,6 +223,9 @@ var genConfigCmd = &cobra.Command{ Short: "Generate a config file.", Long: "Generate a configuration file with all of the default configuration values.", Run: func(cmd *cobra.Command, args []string) { + if viper.GetString("helm-version") != "3" { + klog.Warning("DEPRECATION: --helm-version explicitly set to either 'auto' or '2'. In v3 of Nova, Helm 2 support will be removed.") + } err := viper.SafeWriteConfigAs(cfgFile) if err != nil { klog.Fatal(err) diff --git a/docs/quickstart.md b/docs/quickstart.md index e4150af..3ddad1c 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -9,7 +9,7 @@ Install the golang binary and run it against your cluster. ``` $ go get github.com/fairwindsops/nova -$ nova find --helm-version=auto +$ nova find Release Name Installed Latest Old Deprecated cert-manager v0.11.0 v0.15.2 true false diff --git a/docs/usage.md b/docs/usage.md index db2c331..699aafb 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -6,12 +6,12 @@ meta: # Usage ``` -nova find --helm-version=auto --wide +nova find --wide ``` ## Options * `--config` - Pass a config file that can control the remaining settings. Command-line arguments still take precedence -* `--helm-version` - which version of Helm to use. Options are `2`, `3`, and `auto` (default is `3`) +* `--helm-version` - DEPRECATED: Only helm 3 usage in the future. which version of Helm to use. Options are `2`, `3`, and `auto` (default is `3`) * `--context` - Sets a specific context in the kubeconfig. If blank, uses the currently set context. * `-d`, `--desired-versions` - A map of `chart=override_version` to override the helm repository when checking. * `--wide` - show `Chart Name`, `Namespace` and `HelmVersion`