Skip to content

Commit

Permalink
Add deprecation warnings for Helm 2 (#127)
Browse files Browse the repository at this point in the history
* Add deprecation warnings for Helm 2

* helm storage will be deprecated with helm 2

* Fix e2e tests
  • Loading branch information
Andrew Suderman authored Oct 7, 2020
1 parent d42e2ee commit f3cc99f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ cert-manager/cert-manager-webhook cert-manager MutatingWeb
This indicates that the StatefulSet audit-dashboard-prod-rabbitmq-ha was deployed with apps/v1beta1 which is deprecated in 1.16

You can also use Pluto with helm 2:
**DEPRECATION WARNING** - Helm 2 will deprecated in November of 2020. Please see [here](https://helm.sh/blog/helm-v2-deprecation-timeline/) for more information.

```
$ pluto detect-helm --helm-version=2 -A
Expand Down
5 changes: 0 additions & 5 deletions ROADMAP.md

This file was deleted.

4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ func init() {
detectFilesCmd.PersistentFlags().StringVarP(&directory, "directory", "d", "", "The directory to scan. If blank, defaults to current working dir.")

rootCmd.AddCommand(detectHelmCmd)
detectHelmCmd.PersistentFlags().StringVar(&helmVersion, "helm-version", "3", "Helm version in current cluster (2|3)")
detectHelmCmd.PersistentFlags().StringVar(&helmVersion, "helm-version", "3", "Helm version in current cluster (2|3). WARNING: will be deprecated in a near release.")
detectHelmCmd.PersistentFlags().StringVarP(&namespace, "namespace", "n", "", "Only detect releases in a specific namespace.")
detectHelmCmd.PersistentFlags().StringVar(&helmStore, "helm-store", "configmaps", "Helm storage for v2 (configmaps|secrets)")
detectHelmCmd.PersistentFlags().StringVar(&helmStore, "helm-store", "configmaps", "Helm storage for v2 (configmaps|secrets). WARNING: will be deprecated in a near release.")

rootCmd.AddCommand(listVersionsCmd)
rootCmd.AddCommand(detectCmd)
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/02_helm-detect-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ testcases:
- script: pluto detect-helm --helm-version=2 --target-versions k8s=v1.16.0 --components cert-manager
assertions:
- result.code ShouldEqual 0
- result.systemout ShouldEqual "No output to display"
- result.systemout ShouldContainSubstring "No output to display"

- name: helm2 detect wide namespaced secrets
steps:
Expand Down
2 changes: 2 additions & 0 deletions pkg/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func (h *Helm) FindVersions() error {

switch h.Version {
case "2":
fmt.Println("DEPRECATION WARNING: Helm 2 will be deprecated very soon. Please migrate.")
fmt.Println("please see https://helm.sh/blog/helm-v2-deprecation-timeline/ for more info")
err = h.getReleasesVersionTwo()
case "3":
err = h.getReleasesVersionThree()
Expand Down

0 comments on commit f3cc99f

Please sign in to comment.