Repository: FairwindsOps/pluto
Pull request #79 (2020-05-28 14:53:09)

Add support for secrets for helm v2
It's possible to use helm v2 with added security mesure (disable tiller svc & secrets instead of configmaps):

```bash
helm init --history-max 5 --service-account tiller --override 'spec.template.spec.containers[0].command'='{/tiller,--listen=127.0.0.1:44134,--storage=secret}
```
In order to support this feature, I have add a flag `--helm-store` to the detect-helm command. I have tested it with my EKS sandbox cluster (1.15.x) with installed helm 2.14.2.


laghoule: I forgot to update the readme.md. If you're interresed with this PR, I will update it.
lucasreed: > I forgot to update the readme.md. If you're interresed with this PR, I will update it.

An update to the README would be great! Fine to add that at the end when the other review items are updated. Thanks!
sudermanjr: The venom tests aren't running right now due to Quay outage. I don't think your changes will break them, but you might consider adding some to cover the new functionality
laghoule: I have already made a test coverage of the new functionality ;)
codecov[bot]: # [Codecov](https://codecov.io/gh/FairwindsOps/pluto/pull/79?src=pr&el=h1) Report
> Merging [#79](https://codecov.io/gh/FairwindsOps/pluto/pull/79?src=pr&el=desc) into [master](https://codecov.io/gh/FairwindsOps/pluto/commit/f7e3a0636586d080a419d72dba91bdf841b8a8a9&el=desc) will **increase** coverage by `0.25%`.
> The diff coverage is `83.33%`.

[![Impacted file tree graph](https://codecov.io/gh/FairwindsOps/pluto/pull/79/graphs/tree.svg?width=650&height=150&src=pr&token=A23F79JTNA)](https://codecov.io/gh/FairwindsOps/pluto/pull/79?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
+ Coverage   78.23%   78.49%   +0.25%     
==========================================
  Files           6        6              
  Lines         363      372       +9     
==========================================
+ Hits          284      292       +8     
- Misses         52       53       +1     
  Partials       27       27              
```


| [Impacted Files](https://codecov.io/gh/FairwindsOps/pluto/pull/79?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/helm/helm.go](https://codecov.io/gh/FairwindsOps/pluto/pull/79/diff?src=pr&el=tree#diff-cGtnL2hlbG0vaGVsbS5nbw==) | `65.95% <83.33%> (+2.42%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/FairwindsOps/pluto/pull/79?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/FairwindsOps/pluto/pull/79?src=pr&el=footer). Last update [f7e3a06...3953433](https://codecov.io/gh/FairwindsOps/pluto/pull/79?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

sudermanjr: > I have already made a test coverage of the new functionality ;)

Sorry, I wasn't clear. We have two sets of tests, functional and unit. You got the unit tests covered (which is awesome, thank you). 

We also have functional testing with Venom in the e2e directory. Those are the ones I was referring to.

Patch:
diff --git a/README.md b/README.md
index 66edfa6..5f20e70 100644
--- a/README.md
+++ b/README.md
@@ -107,6 +107,8 @@ invincible-zebu-metrics-server   Deployment   extensions/v1beta1   apps/v1
 lunging-bat-metrics-server       Deployment   apps/v1                            false     false
 ```
 
+In case you have configured helm 2 with `--storage=secret`, you can add the optional `--helm-store secrets`. Default configuration for helm 2 is configmaps.
+
 If you only have access to a certain namespace (helm 3), or if you only want to see information for a single namespace, you can pass the `--namespace` or `-n` flag to restrict the output. Due to the way that helm2 stores configmaps, you will still need access to the tiller namespace if you are using helm 2.
 
 ```
diff --git a/cmd/root.go b/cmd/root.go
index 5016ef2..8040589 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -38,6 +38,7 @@ var (
 	outputFormat       string
 	showAll            bool
 	helmVersion        string
+	helmStore          string
 	ignoreDeprecations bool
 	ignoreRemovals     bool
 	targetVersion      string
@@ -58,6 +59,7 @@ func init() {
 	rootCmd.AddCommand(detectHelmCmd)
 	detectHelmCmd.PersistentFlags().StringVar(&helmVersion, "helm-version", "3", "Helm version in current cluster (2|3)")
 	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)")
 
 	rootCmd.AddCommand(listVersionsCmd)
 	rootCmd.AddCommand(detectCmd)
@@ -135,7 +137,7 @@ var detectHelmCmd = &cobra.Command{
 	Short: "detect-helm",
 	Long:  `Detect Kubernetes apiVersions in a helm release (in cluster)`,
 	Run: func(cmd *cobra.Command, args []string) {
-		h := helm.NewHelm(helmVersion, namespace)
+		h := helm.NewHelm(helmVersion, helmStore, namespace)
 		err := h.FindVersions()
 		if err != nil {
 			fmt.Println("Error running helm-detect:", err)
@@ -158,6 +160,12 @@ var detectHelmCmd = &cobra.Command{
 		klog.V(5).Infof("retCode: %d", retCode)
 		os.Exit(retCode)
 	},
+	PreRun: func(cmd *cobra.Command, args []string) {
+		if helmStore != "secrets" && helmStore != "configmaps" && helmVersion == "2" {
+			fmt.Println("helm-store should be configmaps or secrets")
+			os.Exit(1)
+		}
+	},
 }
 
 var detectCmd = &cobra.Command{
diff --git a/pkg/helm/helm.go b/pkg/helm/helm.go
index e9ef9ef..53f96c8 100644
--- a/pkg/helm/helm.go
+++ b/pkg/helm/helm.go
@@ -33,6 +33,7 @@ type Helm struct {
 	Version   string
 	Kube      *kube
 	Namespace string
+	Store     string
 }
 
 // Release represents a single helm release
@@ -55,11 +56,12 @@ type ChartMeta struct {
 }
 
 // NewHelm returns a basic helm struct with the version of helm requested
-func NewHelm(version string, namespace string) *Helm {
+func NewHelm(version, store, namespace string) *Helm {
 	return &Helm{
 		Version:   version,
 		Kube:      getConfigInstance(),
 		Namespace: namespace,
+		Store:     store,
 	}
 }
 
@@ -78,13 +80,22 @@ func (h *Helm) FindVersions() error {
 	return err
 }
 
-// getReleasesVersionTwo retrieves helm 2 releases from ConfigMaps
+// getReleasesVersionTwo retrieves helm 2 releases from ConfigMaps or Secrets
 func (h *Helm) getReleasesVersionTwo() error {
+	var helmClient *helmstoragev2.Storage
 	if h.Version != "2" {
 		return fmt.Errorf("helm 2 function called without helm 2 version set")
 	}
-	hcm := driverv2.NewConfigMaps(h.Kube.Client.CoreV1().ConfigMaps(""))
-	helmClient := helmstoragev2.Init(hcm)
+	switch h.Store {
+	case "secrets":
+		hs := driverv2.NewSecrets(h.Kube.Client.CoreV1().Secrets(h.Namespace))
+		helmClient = helmstoragev2.Init(hs)
+	case "configmaps":
+		hcm := driverv2.NewConfigMaps(h.Kube.Client.CoreV1().ConfigMaps(""))
+		helmClient = helmstoragev2.Init(hcm)
+	default:
+		return fmt.Errorf("helm-store should be configmap or secrets")
+	}
 	list, err := helmClient.ListReleases()
 	if err != nil {
 		return err


Test patch:
diff --git a/e2e/tests/02_helm-detect-2.yaml b/e2e/tests/02_helm-detect-2.yaml
index ea1a53f..f62810a 100644
--- a/e2e/tests/02_helm-detect-2.yaml
+++ b/e2e/tests/02_helm-detect-2.yaml
@@ -1,7 +1,7 @@
 version: "2"
 name: "Static Code Files (including helm)"
 testcases:
-- name: install helm 2 configmaps
+- name: install helm 2 configmaps and secrets
   steps:
   - script: |
       kubectl create ns helm-system
@@ -34,6 +34,23 @@ testcases:
     - result.code ShouldEqual 0
     - result.systemout ShouldContainSubstring "NAME                                       NAMESPACE   KIND         VERSION   REPLACEMENT   DEPRECATED   DEPRECATED IN   REMOVED   REMOVED IN"
     - result.systemout ShouldContainSubstring "kindled-toucan/kindled-toucan-basic-demo   demo1       Deployment   apps/v1                 false                        false"
+
+- name: helm2 detect in-cluster show-all wide namespaced confimaps
+  steps:
+  - script: pluto detect-helm --helm-version=2 --helm-store configmaps -A -t v1.15.0 -owide -n demo1
+    assertions:
+    - result.code ShouldEqual 0
+    - result.systemout ShouldContainSubstring "NAME                                       NAMESPACE   KIND         VERSION   REPLACEMENT   DEPRECATED   DEPRECATED IN   REMOVED   REMOVED IN"
+    - result.systemout ShouldContainSubstring "kindled-toucan/kindled-toucan-basic-demo   demo1       Deployment   apps/v1                 false                        false"
+
+- name: helm2 detect show all wide namespaced secrets
+  steps:
+  - script: pluto detect-helm --helm-version=2 --helm-store secrets -A -t v1.16.0 -owide
+    assertions:
+    - result.code ShouldEqual 3
+    - result.systemout ShouldContainSubstring "NAME                                             NAMESPACE   KIND         VERSION              REPLACEMENT   DEPRECATED   DEPRECATED IN   REMOVED   REMOVED IN"
+    - result.systemout ShouldContainSubstring "invincible-zebu/invincible-zebu-metrics-server   default     Deployment   extensions/v1beta1   apps/v1       true         v1.9.0          true      v1.16.0"
+
 - name: cleanup
   steps:
   - script: |
diff --git a/e2e/tests/assets/helm2/helm2secrets-deprecated.yaml b/e2e/tests/assets/helm2/helm2secrets-deprecated.yaml
new file mode 100644
index 0000000..f97d4d7
--- /dev/null
+++ b/e2e/tests/assets/helm2/helm2secrets-deprecated.yaml
@@ -0,0 +1,17 @@
+apiVersion: v1
+data:
+  release: SDRzSUFBQUFBQUFDLyt3OFFZd2t5VkhhMnh0akp6YVk0YmpIOFFuM25ObmQ4VmIxenQxNmRXcTBpTG5adFQzeTdWNXJaNzJXdFZyZFpGZEZkNmNucTdJdU02dG4rbVlHZ2N3UC9FQkNGano0SUV2d1FNSUNKQjQ4TFBqeDRnRXYzaUFRRmo5TGZIaWd6S3lxenFycTd1bVoyNzJibGRuSGJIZFZaR1JFWkdSa1JHUkVrMTlrNllTbEVSdHdERDdDUWI3K24xZkkzMTc1N0pYT1gxMTVQRVpJVUVzV2dVSTVRUWxqcW1DQW1FS01HUmRUakVNZ1pEY0ZDa004aElTbHVVWUZVNUdER291Y3h6QkFvQU9Pb0FWd3BuU0JUa0d1V0RvQ1BVWVlDczdGSVV0SEpCSkpRdE80UndqQVFUN0FTSE1Zb1lZZ2tQUVFPbDJhTWRVdEVJUUg3NmlRaWU1a2E0Q2FiblZURWFQcWtQWFBmL2FQZnZUSFAxMzc0bTkvN3g5LytNb2J0VytiWDl4TmxhYWNReVNTaktQR04vN3ArMWZJMzd4Q2ZxRkFHamd1MSsrTXRjNVVyOXNkTVQzT0IyRWtrcTRoU0thb1VRVXNqZklCMVVKMjYrUGV1T0M0em1mZUNyZHV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2ZncmJENzUvZklyZHlnZHE1MGNNL1ZpU3h0VDZ0VmpWek9aclJQb25Pc2RpM3ZUZDIrb0svVDFaNWszcVc5Si84RjEvZXJkYUJkSmlybk43S3QzSmQyZG0yQ3A0eXRLb1haUDF1djBIZ1dHT3kxWjJkVU1YaUFjK29aR20rYmxRMk4xMzZOdy9OdW9WdlExcmFrUjIxcDA5blRaeGRzSVR2bnNkZjhsWmhQN2VkZlBzbERyL1VETGhkekRUL0YzMmg1NjRldmtvMHpnZ1NOU3E5ZjdZdjRqVnNMMVdCQitYdm5INjZlby94OUJUb3VqZHQ2V1l2V3o4ai8zTDc5OXB5U2RPZERMS3BBMzd6eXVYZXV2UHR6aGJiK1h3QUFBUC8vOW5renR2aGZBQUE9Cg==
+kind: Secret
+metadata:
+  creationTimestamp: "2020-04-02T21:24:40Z"
+  labels:
+    MODIFIED_AT: "1585862680"
+    NAME: invincible-zebu
+    OWNER: TILLER
+    STATUS: DEPLOYED
+    VERSION: "1"
+  name: invincible-zebu.v1
+  namespace: helm-system
+  resourceVersion: "265249"
+  selfLink: /api/v1/namespaces/helm-system/configmaps/invincible-zebu.v1
+  uid: 362f70c7-91dc-4478-88eb-08a7b368bfd0
diff --git a/pkg/helm/helm_test.go b/pkg/helm/helm_test.go
index b8d5b99..887446d 100644
--- a/pkg/helm/helm_test.go
+++ b/pkg/helm/helm_test.go
@@ -72,6 +72,21 @@ var (
 			"release": []byte("H4sIAAAAAAAC/+xbaZOiyLr+Kwb3fLg3oqoasKwujZgPQiniQpWoLDk1MUEmCGiyjCyKHf3fb2TigkttfebE+TIdYbRCkvmuz/u8SdYPJrQCh2kxnoOD1ElS5obxw3nEtH4wc3+VpH/aToyjwrGZFsOzPHvL3t+y/JT73uL5Vv3h7v7x/jv7HTA3DLa+Mtp2sJPScfRHglZ+nPpRyLQYOUxSC+MaioKYDGJumCS10ixhWsxh/hsmjFKHXOLuapKT1lLPqVlxjH1kkXlqM3VYg0VtlYWhH7rkduKQKQMrtJPWa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GIakLMbYrI8HwwAvgd7JRT/KbIlbo6D5l+g3eMQrOZBmeQlnJBoCK/TnDs2X1/D29vY1/J/ahAZvq1Y92vntXcR7DY8nN1u1nHsNl35ot2qTk9h9DffnR+lJXBJw5SJkgdvqaq9hUsIAHXi7G5r6GDur2zRaOuHtw3IdLD8r8tu766eSO5vUCcnX5FvOQSe1Dpo8HWb4vBa3hzlqNWxBB5fq1Ojou8T7RgeeCn1Lj82Ww64fNz4d/9bI/aHjo2hvjcz3yr/uzteWZ4avDQ2s0HId+xYWrdqUOuM1TGIHUbV2KJi0alThZAedO5UDK0XesGqEr+j3eQ33Pt8vW3UV+YdPRfiaEF8x9MEu9MdJHijvBf7+gZOSUZH3x8/j9/03FIWp5YfOqqrYbe09Rd5b4nyZ6lLkH63VJF5o9W6dRk1lyMuBBbRqVRJQHUhqX3K29kHyNI1P71RUfYlI6jyy5wPiVZRGKMKt2lR8qd7Efu6ETpK8rCLonK1IVpKccxvUaoQstGrfLi7Ttc/FWzmW7f+HV9jxiivO+ioQXkE/K44J7v07kPcP1P0Ddf9A3T9Q9x+EuuofGXFlt0P/oon+nRj9mybm5/8HAAD//+BteWThNgAA"),
 		},
 	}
+	helmSecret2 = v1.Secret{
+		ObjectMeta: metav1.ObjectMeta{
+			Name: "sh.helm.release.v1.helmtest.v1",
+			Labels: map[string]string{
+				"MODIFIED_AT": "1585859667",
+				"NAME":        "helmtest",
+				"OWNER":       "TILLER",
+				"STATUS":      "DEPLOYED",
+				"VERSION":     "1",
+			},
+		},
+		Data: map[string][]byte{
+			"release": []byte("H4sIAAAAAAAC/+xaX28cSbVXstp7V3Wz9658ERKLkA5tr5KYdI8dULBaCpLXDsEicaw4m9VqtYpqus/MVFxd1VtVPfYwGZ4Qb0jwsALxCXjbJySekPgYSCBekBAPPMEHQKe6e6bnnz3OgnixH6zu6lPn/zm/+jPsrR7KzKF1a5+9wf58/a1rwZ+ub0fwEB24HgLPcykS7oRW8MHTR9AegCmUEqpLny1CorOMq9TGD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fqZuD53jGkwlgWdYVr+f+l+ixq/8C0/P96oNdt0b/61fZVa8KozZOTIveoZ9lmZE9zthm1+QnbjFxGz9qILtv8IVuH59xQqsPB/gPLotzol5g4FokUeaskN/oli/o20Sm2WPAme4Pc/usvsTAM2Toc+/SIp6C4de76gr3e6qL+/VPYlLTaCmI1VZcfKLMvfpy8UPslh8cz9z1TM/yvojzVsouMKfcsJpzcWtRqLSEc3/QE5a+sgiV0zbucZ979C44Otlc5IVjZqpXtutyxwSXkX8Kzk9OExTv7xbl90e59svNcYVO+0ICL9uOjqdcFm22/lIibybFkCz21Er7aMH/hDfPosj1tvpFd4sBxWX5eda2rrnXVta661spda+fa+/9d7cP+GQAA//9E8AqZly8AAA=="),
+		},
+	}
 	wantOutput = []*api.Output{
 		{
 			Name:      "helmtest/helmtest-helmchartest-v1beta1",
@@ -111,11 +126,12 @@ var (
 	}
 )
 
-func newMockHelm(version string, namespace string) *Helm {
+func newMockHelm(version, store, namespace string) *Helm {
 	return &Helm{
 		Version:   version,
 		Namespace: namespace,
 		Kube:      getMockConfigInstance(),
+		Store:     store,
 	}
 }
 
@@ -165,10 +181,12 @@ func TestHelm_getManifestsVersionTwo(t *testing.T) {
 	tests := []struct {
 		name        string
 		helmVersion string
+		store       string
 		namespace   string
 		wantErr     bool
 		errMessage  string
 		configMap   *v1.ConfigMap
+		secret      *v1.Secret
 		want        []*api.Output
 	}{
 		{
@@ -178,15 +196,32 @@ func TestHelm_getManifestsVersionTwo(t *testing.T) {
 			errMessage:  "helm 2 function called without helm 2 version set",
 		},
 		{
-			name:        "helm 2 valid",
+			name:        "helm 2 valid configmap",
 			helmVersion: "2",
+			store:       "configmaps",
 			configMap:   &helmConfigMap,
 			want:        wantOutput,
 		},
+		{
+			name:        "helm 2 valid secret",
+			helmVersion: "2",
+			store:       "secrets",
+			secret:      &helmSecret2,
+			want:        wantOutput,
+		},
+		{
+			name:        "helm 2 bad store",
+			helmVersion: "2",
+			store:       "badstore",
+			secret:      &helmSecret2,
+			wantErr:     true,
+			errMessage:  "helm-store should be configmap or secrets",
+		},
 		{
 			name:        "helm 2 other namespace",
 			namespace:   "demo1",
 			helmVersion: "2",
+			store:       "configmaps",
 			configMap:   &helmConfigMap,
 			want:        nil,
 		},
@@ -194,18 +229,25 @@ func TestHelm_getManifestsVersionTwo(t *testing.T) {
 			name:        "helm 2 target namespace",
 			namespace:   "demo1",
 			helmVersion: "2",
+			store:       "configmaps",
 			configMap:   &helmConfigMap2,
 			want:        wantOutputNamespaced,
 		},
 	}
 	for _, tt := range tests {
-		h := newMockHelm(tt.helmVersion, tt.namespace)
+		h := newMockHelm(tt.helmVersion, tt.store, tt.namespace)
 		if tt.configMap != nil {
-			_, err := h.Kube.Client.CoreV1().ConfigMaps("kube-system").Create(tt.configMap)
+			_, err := h.Kube.Client.CoreV1().ConfigMaps(tt.namespace).Create(tt.configMap)
 			if err != nil {
 				t.Errorf("failed putting configMap in mocked kube. test: %s", tt.name)
 			}
 		}
+		if tt.secret != nil {
+			_, err := h.Kube.Client.CoreV1().Secrets(tt.namespace).Create(tt.secret)
+			if err != nil {
+				t.Errorf("failed putting secret in mocked kube. test: %s", tt.name)
+			}
+		}
 		t.Run(tt.name, func(t *testing.T) {
 			err := h.getReleasesVersionTwo()
 			if tt.wantErr {
@@ -242,7 +284,7 @@ func TestHelm_getManifestsVersionThree(t *testing.T) {
 	}
 
 	for _, tt := range tests {
-		h := newMockHelm(tt.helmVersion, "")
+		h := newMockHelm(tt.helmVersion, "secrets", "")
 		if tt.secret != nil {
 			_, err := h.Kube.Client.CoreV1().Secrets("default").Create(tt.secret)
 			if err != nil {
@@ -265,6 +307,7 @@ func TestHelm_getManifest_badClient(t *testing.T) {
 	tests := []struct {
 		name        string
 		helmVersion string
+		store       string
 		wantErr     bool
 		errMessage  string
 		secret      *v1.Secret
@@ -273,6 +316,7 @@ func TestHelm_getManifest_badClient(t *testing.T) {
 		{
 			name:        "two - bad client",
 			helmVersion: "2",
+			store:       "configmaps",
 			wantErr:     true,
 			errMessage:  "helm 3 function called without helm 3 version set",
 		},
@@ -287,6 +331,7 @@ func TestHelm_getManifest_badClient(t *testing.T) {
 	for _, tt := range tests {
 		h := &Helm{
 			Version: tt.helmVersion,
+			Store:   tt.store,
 			Kube:    newBadKubeClient(),
 		}
 		t.Run(tt.name, func(t *testing.T) {
@@ -318,7 +363,7 @@ func TestHelm_FindVersions(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			h := newMockHelm(tt.helmVersion, "")
+			h := newMockHelm(tt.helmVersion, "", "secrets")
 			err := h.FindVersions()
 			if tt.wantErr {
 				assert.EqualError(t, err, tt.errMessage)