From f7e3a0636586d080a419d72dba91bdf841b8a8a9 Mon Sep 17 00:00:00 2001 From: Andrew Suderman Date: Wed, 20 May 2020 13:17:22 -0600 Subject: [PATCH] Adding a namespace flag to restrict helm checking (#77) * Adding a namespace flag to restrict helm checking * Update kind node image --- .circleci/config.yml | 1 + README.md | 10 ++- cmd/root.go | 4 +- e2e/tests/01_helm-detect-3.yaml | 18 ++++- e2e/tests/02_helm-detect-2.yaml | 12 ++- ...helm2cm-no-deprecated-multi-namespace.yaml | 76 +++++++++++++++++++ e2e/tests/assets/helm3/secret-demo2.json | 49 ++++++++++++ e2e/tests/assets/helm3/secret.json | 23 ++++++ e2e/tests/assets/helm3/secret.yaml | 23 ------ pkg/helm/helm.go | 23 +++--- pkg/helm/helm_test.go | 56 ++++++++++++-- 11 files changed, 251 insertions(+), 44 deletions(-) create mode 100644 e2e/tests/assets/helm2/helm2cm-no-deprecated-multi-namespace.yaml create mode 100644 e2e/tests/assets/helm3/secret-demo2.json create mode 100644 e2e/tests/assets/helm3/secret.json delete mode 100644 e2e/tests/assets/helm3/secret.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml index 2995cf5e..5371dea6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,7 @@ references: rm goreleaser.deb e2e_config: &e2e_config command_runner_image: quay.io/reactiveops/ci-images:v11-stretch + kind_node_image: "kindest/node:v1.18.0@sha256:0e20578828edd939d25eb98496a685c76c98d54084932f76069f886ec315d694" executor: golang-exec pre_script: e2e/pre.sh store-test-results: /tmp/test-results diff --git a/README.md b/README.md index 44d9780a..66edfa60 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ [goreport-image]: https://goreportcard.com/badge/github.com/FairwindsOps/pluto [goreport-link]: https://goreportcard.com/report/github.com/FairwindsOps/pluto -[circleci-image]: https://circleci.com/gh/FairwindsOps/pluto.svg?style=svg +[circleci-image]: https://circleci.com/gh/FairwindsOps/pluto/tree/master.svg?style=svg [circleci-link]: https://circleci.com/gh/FairwindsOps/pluto [codecov-image]: https://codecov.io/gh/FairwindsOps/pluto/branch/master/graph/badge.svg @@ -107,6 +107,14 @@ invincible-zebu-metrics-server Deployment extensions/v1beta1 apps/v1 lunging-bat-metrics-server Deployment apps/v1 false false ``` +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. + +``` +$ pluto detect-helm -n cert-manager -owide +NAME NAMESPACE KIND VERSION REPLACEMENT DEPRECATED DEPRECATED IN REMOVED REMOVED IN +cert-manager/cert-manager-webhook cert-manager MutatingWebhookConfiguration admissionregistration.k8s.io/v1beta1 admissionregistration.k8s.io/v1 true v1.16.0 false v1.19.0 +``` + ### Helm Chart Checking (local files) You can run `helm template | pluto detect --show-all -` diff --git a/cmd/root.go b/cmd/root.go index 1c41217c..5016ef28 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -41,6 +41,7 @@ var ( ignoreDeprecations bool ignoreRemovals bool targetVersion string + namespace string ) func init() { @@ -56,6 +57,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.") rootCmd.AddCommand(listVersionsCmd) rootCmd.AddCommand(detectCmd) @@ -133,7 +135,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) + h := helm.NewHelm(helmVersion, namespace) err := h.FindVersions() if err != nil { fmt.Println("Error running helm-detect:", err) diff --git a/e2e/tests/01_helm-detect-3.yaml b/e2e/tests/01_helm-detect-3.yaml index e29f4650..6c0e62b8 100644 --- a/e2e/tests/01_helm-detect-3.yaml +++ b/e2e/tests/01_helm-detect-3.yaml @@ -1,9 +1,11 @@ version: "2" name: "Static Code Files (including helm)" testcases: -- name: install helm3 release secret +- name: install helm3 assets steps: - - script: kubectl apply -f assets/helm3 + - script: | + kubectl create ns demo2 + kubectl apply -f assets/helm3 assertions: - result.code ShouldEqual 0 @@ -51,6 +53,16 @@ testcases: - result.systemout ShouldContainSubstring "NAME NAMESPACE KIND VERSION REPLACEMENT DEPRECATED DEPRECATED IN REMOVED REMOVED IN" - result.systemout ShouldContainSubstring "test/test-helm3chart-v1beta1 default Deployment extensions/v1beta1 apps/v1 true v1.9.0 true v1.16.0" +- name: helm detect show all wide namespaced + steps: + - script: pluto detect-helm --helm-version=3 -A -t v1.16.0 -owide -n demo2 + assertions: + - result.code ShouldEqual 0 + - result.systemout ShouldContainSubstring "NAME NAMESPACE KIND VERSION REPLACEMENT DEPRECATED DEPRECATED IN REMOVED REMOVED IN" + - result.systemout ShouldContainSubstring "demo2/demo2-basic-demo demo2 Deployment apps/v1 false false" + - name: cleanup steps: - - script: kubectl delete -f assets/helm3 + - script: | + kubectl delete -f assets/helm3 + kubectl delete ns demo2 diff --git a/e2e/tests/02_helm-detect-2.yaml b/e2e/tests/02_helm-detect-2.yaml index afe2a781..ea1a53ff 100644 --- a/e2e/tests/02_helm-detect-2.yaml +++ b/e2e/tests/02_helm-detect-2.yaml @@ -26,6 +26,16 @@ testcases: - result.systemout ShouldContainSubstring "NAME KIND VERSION REPLACEMENT REMOVED DEPRECATED" - result.systemout ShouldContainSubstring "invincible-zebu/invincible-zebu-metrics-server Deployment extensions/v1beta1 apps/v1 true true" - result.systemout ShouldNotContainSubstring "lunging-bat/lunging-bat-metrics-server Deployment apps/v1 false false" + +- name: helm2 detect in-cluster show-all wide namespaced + steps: + - script: pluto detect-helm --helm-version=2 -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: cleanup steps: - - script: kubectl delete ns helm-system + - script: | + kubectl delete -f assets/helm2/ + kubectl delete ns helm-system diff --git a/e2e/tests/assets/helm2/helm2cm-no-deprecated-multi-namespace.yaml b/e2e/tests/assets/helm2/helm2cm-no-deprecated-multi-namespace.yaml new file mode 100644 index 00000000..a3e11547 --- /dev/null +++ b/e2e/tests/assets/helm2/helm2cm-no-deprecated-multi-namespace.yaml @@ -0,0 +1,76 @@ +apiVersion: v1 +items: +- apiVersion: v1 + data: + release: H4sIAAAAAAAC/+x7TWwcR3YwVobWdvnDB4cBFsgCC7wMtZDF9fTMUGtbaUAHSqRtIhI1IGktFrYh1XS/mSmxuqtdVT3kmGSQLHLJKchxsUCOAQIskMte9p5bkEsOQXLNIfdcAiS5BFXVP9U9M/yRZMRIPAdipurVe6/eT71Xrx7J/z9iacwx7mqRRzRd+5M3yD/ceOt7nb+/MQjgE9Sgpwg0yziLqGYihc/2H8FoDjJPU5ZOzLRCiESS0DRWIQHAk0xIDcMn28/2th7v3L/13lE+wkhzmKCGTMQKut2UJqgyGiHEmIgBdDl0aJYFBlSmqFEFTPQM1P0RVSzqGrD3FyFYqjRNI7zf3EYHugJeKJFmVE/vd04DpjFRn/e/DBLUNKaaBgb3eeeOYTiaCug8ZYppmGqdhb3eYPOjoB/0g0F4r3+vD1pArhDmIpe+LDoEoNyb2XN3LOQxlTHcKjcPZnl4r0/W3nnrz3/5F/9+891f/+YXD37o/9h4d9fsgXMjxIyjxh/+VUR2Can33bnZD+4Gdzd+tAUPzCD8YSUD2MZEwMMplTr8f4SoPEaZ0PSF3L8xG7x4YxD01/7tHfK7GpOMU42qt/fkcOcg0Cd67Z/feTkNn552gY0heEp5bpSQTiQqFWBKRxxjOD+3EJKmE4RbU6E0hPcXoM24MrAAHnQbymivgDKKOT01hBegNDcw6vQUMDX0w17v9LQgfX5+egpBTchBkPZXrtCgjkSqK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lCWrvQogjE1sCZh+njti4bVWjnbUrbflJziPlLl+QpyxDZHMrKoVjritEGw+dfLlugeQP88NEBPOAiOlqyxM9YzPiibKq8KXBJU1DYnIEc9Ft2swDsUqQKfvPeY7ZiQZlnXRF/BX4ZBb+EVkLda3izX5QrIapMuoHLy+ZKwKY4l1esnDLcP17Qss60Cc0amEugykC/cEh0bpI3Ts/Jxp/+gHS7XbIOB+5tEuq7ZW+x8P+6CvvN/3jp1jRXFvMHr3J39vBffklu8nYV6fileXLNwvxqSVytGN/aWqvqXs927b/hkGtu/vLy+iHjHGWrQt2+N7YK0lV30zdbeG6J5vXqvNVbSl6ys/R/mfr/Rzz0dfV8LvBwbVldta9zCaW6oXNZLhO6JOXCrs2i2PPaujM7H/T7nes2Xi6r6F2303J13e+7/srv+itfa3+lX7fzJOVX8OrPYi3Px+9X9VqoBpeiukLAKRsSX3vD4eW52GtqMrwo1jUaC++2mwhtJf+ba6/7sH/vew9u2n/m/u8AAAD//4XCOOBUPgAA + kind: ConfigMap + metadata: + creationTimestamp: "2020-05-19T21:15:59Z" + labels: + MODIFIED_AT: "1589922959" + NAME: kindled-toucan + OWNER: TILLER + STATUS: DEPLOYED + VERSION: "1" + managedFields: + - apiVersion: v1 + fieldsType: FieldsV1 + fieldsV1: + f:data: + .: {} + f:release: {} + f:metadata: + f:labels: + .: {} + f:MODIFIED_AT: {} + f:NAME: {} + f:OWNER: {} + f:STATUS: {} + f:VERSION: {} + manager: tiller + operation: Update + time: "2020-05-19T21:15:59Z" + name: kindled-toucan.v1 + namespace: helm-system + resourceVersion: "2008" + selfLink: /api/v1/namespaces/helm-system/configmaps/kindled-toucan.v1 + uid: 5e9399b5-26d6-4530-9b84-5d9f7edc471c +- apiVersion: v1 + data: + release: H4sIAAAAAAAC/+w7S4wkR1basby2w4BMI63ESis9qmc1nl5XVlXP2h5SmkN7um23mOkpdbdntRpbM1GZr6piOjIjHRFZ3eXuRgi4cOQGWokLEhISEhcuvnPjwAWh5cqBOxcklguK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vqMnwoljXaCy8024itJX8b6697oP+3e999EbxoPe/AQAA///p1scvWD4AAA== + kind: ConfigMap + metadata: + creationTimestamp: "2020-05-19T21:15:38Z" + labels: + MODIFIED_AT: "1589922938" + NAME: kissing-sponge + OWNER: TILLER + STATUS: DEPLOYED + VERSION: "1" + managedFields: + - apiVersion: v1 + fieldsType: FieldsV1 + fieldsV1: + f:data: + .: {} + f:release: {} + f:metadata: + f:labels: + .: {} + f:MODIFIED_AT: {} + f:NAME: {} + f:OWNER: {} + f:STATUS: {} + f:VERSION: {} + manager: tiller + operation: Update + time: "2020-05-19T21:15:38Z" + name: kissing-sponge.v1 + namespace: helm-system + resourceVersion: "1873" + selfLink: /api/v1/namespaces/helm-system/configmaps/kissing-sponge.v1 + uid: 7790276b-e910-4234-b547-0324cc085388 +kind: List +metadata: + resourceVersion: "" + selfLink: "" diff --git a/e2e/tests/assets/helm3/secret-demo2.json b/e2e/tests/assets/helm3/secret-demo2.json new file mode 100644 index 00000000..4302686f --- /dev/null +++ b/e2e/tests/assets/helm3/secret-demo2.json @@ -0,0 +1,49 @@ +{ + "apiVersion": "v1", + "data": { + "release": "SDRzSUFBQUFBQUFDLzl4OGEyK2pPcnZvWDRseTlvZHpwTFlEcE9rMGtkYUhRQU1oVGVpRU5Gejh6cXRYMktaQVlpNHJYQkt5TlAvOXlBWnk3N1N6enF3dG5UMVNOQVhzeDgvOVpzTmY3Y2dKM1hhL2pkMHdGdG8zN1NCNmk5djl2OXB2d1RyTi9vUGRoTVNsaTl2OXRzQUozQzNYdmVWN3IzeTNmOC8zaGM0ZC8vV3h3Mys5NVI3NkhOZSthUlBubDZkZ2w3Z1pHOHd1VXJRT2tpeUlvM2EvclVacDVoRFNRbkdZMEVIdG0zYWFPVm1lTW16clJXN2FVWnk1OUJaLzExTGNySlg1YnN0SkVoSWdoOEpwTGZSSkM1YXRkUjVGUWVUUng2bExRWVpPaE5QKzk2alZjcmRKdk01YTMxNmUvcU1OcHNNLy91dC9yM0xvb295MF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1bVRHdDMxYnROK3F1cUxIUTl5bzZCOWZINURRaDdJK25JLytvMnF2UTkwWVRFNUh0VnFzRDAzUjZYTGM2YklIR0svcTYyVDQ3c1N6TnZON1FLYkQxOEhUNEhYd0xweDMydHluOEk3OXl2a0t4NTZrK2JjWDBMZmFCUjJjMEI3a05hZkRKTzJpZkIxa3BSUkhtYnZOemxaZDU5RWdYYVR1dXQvaUJlNE1xa05JdlBtMkRvcUF1SjQ3VEpGRFdGdTAzMklkME5QQlNUTU9YMzI4ZGgzOEVwRlNqK05NRG9pYmxtbm1odjFXdHM3ZEt5aHBjVVJIWG51T25NU0JBUW15d0QzbllhdUYxM0Z5Y1pNeWR6QTVVUm9TRkc3a3B1bTNkUXpkc3dsVUFvcWJYWUJKbk16dnQ3NWMzTDRJQUEyOXdUKzhRdDB6UHdOVHRjOHZZS01rNzdlK2N1SDUvYXBYM20vVnJmSnpxVlVOOXV2UStFOUErMHc4YXQ2dE9BdEVlUlpUbFFzaTcwc2huQ1JtbzNnZDdLaE5rRzh4SHRUajNQV3ZKbWRzVnJWWnBMdHYrNEIxSlJiU0I1Zng4QkRYcjRYQk1JaDBsMzN4SysyM09uVXllTGdqTUdPcjlwb3EvdDdXS1loZUM3WmFvQkZ6L3pTVFFFbCttb2NNQ25mdGVPNGlDMGl3cTgzMGdmc2VIWDhTaksvMmJkaTMwL2FmbWZ2eGZ3TUFBUC8vRzRVVFVuZE9BQUE9" + }, + "kind": "Secret", + "metadata": { + "creationTimestamp": "2020-05-19T21:41:23Z", + "labels": { + "modifiedAt": "1589924483", + "name": "demo2", + "owner": "helm", + "status": "deployed", + "version": "1" + }, + "managedFields": [ + { + "apiVersion": "v1", + "fieldsType": "FieldsV1", + "fieldsV1": { + "f:data": { + ".": {}, + "f:release": {} + }, + "f:metadata": { + "f:labels": { + ".": {}, + "f:modifiedAt": {}, + "f:name": {}, + "f:owner": {}, + "f:status": {}, + "f:version": {} + } + }, + "f:type": {} + }, + "manager": "helm", + "operation": "Update", + "time": "2020-05-19T21:41:23Z" + } + ], + "name": "sh.helm.release.v1.demo2.v1", + "namespace": "demo2", + "resourceVersion": "1536", + "selfLink": "/api/v1/namespaces/demo2/secrets/sh.helm.release.v1.demo2.v1", + "uid": "d324fe69-840c-4978-8054-d860c7ff99ca" + }, + "type": "helm.sh/release.v1" +} diff --git a/e2e/tests/assets/helm3/secret.json b/e2e/tests/assets/helm3/secret.json new file mode 100644 index 00000000..a76ec270 --- /dev/null +++ b/e2e/tests/assets/helm3/secret.json @@ -0,0 +1,23 @@ +{ + "apiVersion": "v1", + "data": { + "release": "SDRzSUFBQUFBQUFDLyt4N1czT3FTcmYyWDdINDNvdHZWeVdaZ0RFeldyVXVoRVRFS0ltb0hQck5XNnZvaGdEYURTdzVLTTZhLzMxWE4zZzJoN24yM0xWdlZxcFNFV2pHcVVjLzR4bHQ1d2NYT2NUak9sem1wUmwzeFlYUlc4eDFmbkJ2NFRMTi9uUzlCTWVsNTNJZFR1UkYvcHB2WFF1M1U0SHZDTTFPNi82bTNlVEZ1L3RyL3E3RDg5d1ZoNTFmZnNYMXNKZXh3ZXdpUmNzd3ljSTQ0anFjR3FXWmczRUR4U1NoZzdnckxzMmNMRSs1RHJkVGNzVkZjZWJSVzhKTlEvR3lSaFo0RFNkSmNJZ2NLcWN4MDRjTldEYVdlUlNGa1U4ZnB4NFZTWnpJVFR1dlVhUGhyWk40bVRWZW5oLysxTHFqeHovKzlmOFhPZlJRaGh1K2x6V1MyRTBiMTljMFNHbmlJSy9oZW05T2pyUEdOVzY4Y2s2UzNORFJ5OGpMdlBRbWpML1JnWDhFSGlaTkZEakw3T3A4UkVqOWlwRDNCNDM0SzllNGpodnpOSTRTSnd2K2VPViszSVNaUjlKLzgvKzVJVjdtdUU3bTNGQ1pQMSs1LzJMV29pQnV2SEpHbUlaWkk4aXlwUFB0bXlCK3YrRnYrQnVoYzgvZjg0MHNidVNwMXlqamZIa1lpbGVPdnIvMTdaSkxOQTdYYi9GeTVTemR4cisyQVds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"kind": "Secret", + "metadata": { + "creationTimestamp": "2020-05-14T16:13:59Z", + "labels": { + "modifiedAt": "1589472839", + "name": "test", + "owner": "helm", + "status": "deployed", + "version": "1" + }, + "name": "sh.helm.release.v1.test.v1", + "namespace": "default", + "resourceVersion": "2869", + "selfLink": "/api/v1/namespaces/default/secrets/sh.helm.release.v1.test.v1", + "uid": "f8151892-2b13-4a55-929b-d7b138feeef6" + }, + "type": "helm.sh/release.v1" +} diff --git a/e2e/tests/assets/helm3/secret.yaml b/e2e/tests/assets/helm3/secret.yaml deleted file mode 100644 index a973ddeb..00000000 --- a/e2e/tests/assets/helm3/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{ - "apiVersion": "v1", - "data": { - "release": "SDRzSUFBQUFBQUFDLyt4N1czT3FTcmYyWDdINDNvdHZWeVdaZ0RFeldyVXVoRVRFS0ltb0hQck5XNnZvaGdEYURTdzVLTTZhLzMxWE4zZzJoN24yM0xWdlZxcFNFV2pHcVVjLzR4bHQ1d2NYT2NUak9sem1wUmwzeFlYUlc4eDFmbkJ2NFRMTi9uUzlCTWVsNTNJZFR1UkYvcHB2WFF1M1U0SHZDTTFPNi82bTNlVEZ1L3RyL3E3RDg5d1ZoNTFmZnNYMXNKZXh3ZXdpUmNzd3ljSTQ0anFjR3FXWmczRUR4U1NoZzdnckxzMmNMRSs1RHJkVGNzVkZjZWJSVzhKTlEvR3lSaFo0RFNkSmNJZ2NLcWN4MDRjTldEYVdlUlNGa1U4ZnB4NFZTWnpJVFR1dlVhUGhyWk40bVRWZW5oLysxTHFqeHovKzlmOFhPZlJRaGh1K2x6V1MyRTBiMTljMFNHbmlJSy9oZW05T2pyUEdOVzY4Y2s2UzNORFJ5OGpMdlBRbWpML1JnWDhFSGlaTkZEakw3T3A4UkVqOWlwRDNCNDM0SzllNGpodnpOSTRTSnd2K2VPViszSVNaUjlKLzgvKzVJVjdtdUU3bTNGQ1pQMSs1LzJMV29pQnV2SEpHbUlaWkk4aXlwUFB0bXlCK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Qvd09xTFlIWDRMeUJDUmQvWmY1dXcvOTVoLzIvQy9menZBQUFBLy85TmZjQ25mVFFBQUE9PQ==" - }, - "kind": "Secret", - "metadata": { - "creationTimestamp": "2020-05-14T16:13:59Z", - "labels": { - "modifiedAt": "1589472839", - "name": "test", - "owner": "helm", - "status": "deployed", - "version": "1" - }, - "name": "sh.helm.release.v1.test.v1", - "namespace": "default", - "resourceVersion": "2869", - "selfLink": "/api/v1/namespaces/default/secrets/sh.helm.release.v1.test.v1", - "uid": "f8151892-2b13-4a55-929b-d7b138feeef6" - }, - "type": "helm.sh/release.v1" -} diff --git a/pkg/helm/helm.go b/pkg/helm/helm.go index 9c44f3b4..e9ef9efe 100644 --- a/pkg/helm/helm.go +++ b/pkg/helm/helm.go @@ -28,10 +28,11 @@ import ( // Helm represents all current releases that we can find in the cluster type Helm struct { - Releases []*Release - Outputs []*api.Output - Version string - Kube *kube + Releases []*Release + Outputs []*api.Output + Version string + Kube *kube + Namespace string } // Release represents a single helm release @@ -54,10 +55,11 @@ type ChartMeta struct { } // NewHelm returns a basic helm struct with the version of helm requested -func NewHelm(version string) *Helm { +func NewHelm(version string, namespace string) *Helm { return &Helm{ - Version: version, - Kube: getConfigInstance(), + Version: version, + Kube: getConfigInstance(), + Namespace: namespace, } } @@ -83,11 +85,14 @@ func (h *Helm) getReleasesVersionTwo() error { } hcm := driverv2.NewConfigMaps(h.Kube.Client.CoreV1().ConfigMaps("")) helmClient := helmstoragev2.Init(hcm) - list, err := helmClient.ListDeployed() + list, err := helmClient.ListReleases() if err != nil { return err } for _, release := range list { + if h.Namespace != "" && release.Namespace != h.Namespace { + continue + } deployed, err := helmClient.Deployed(release.Name) if err != nil { return fmt.Errorf("error determining most recent deployed for '%s'\n %w", release.Name, err) @@ -112,7 +117,7 @@ func (h *Helm) getReleasesVersionThree() error { if h.Version != "3" { return fmt.Errorf("helm 3 function called without helm 3 version set") } - hs := driverv3.NewSecrets(h.Kube.Client.CoreV1().Secrets("")) + hs := driverv3.NewSecrets(h.Kube.Client.CoreV1().Secrets(h.Namespace)) helmClient := helmstoragev3.Init(hs) list, err := helmClient.ListDeployed() if err != nil { diff --git a/pkg/helm/helm_test.go b/pkg/helm/helm_test.go index eff1d377..b8d5b992 100644 --- a/pkg/helm/helm_test.go +++ b/pkg/helm/helm_test.go @@ -42,6 +42,21 @@ var ( "release": "H4sIAAAAAAAC/+xaX28cSbVXstp7V3Wz9658ERKLkA5tr5KYdI8dULBaCpLXDsEicaw4m9VqtYpqus/MVFxd1VtVPfYwGZ4Qb0jwsALxCXjbJySekPgYSCBekBAPPMEHQKe6e6bnnz3OgnixH6zu6lPn/zm/+jPsrR7KzKF1a5+9wf58/a1rwZ+ub0fwEB24HgLPcykS7oRW8MHTR9AegCmUEqpLny1CorOMq9TGDADPcm0cHD3Zf3G4+/jB/Y1bJ0UbEyehiw5ynVoIQ8UztDlPEFLs8EI6CCUEPM8jIjYKHdpI6BbR3Sflkh43pOCdeRqhrOMqKemIJoBQw0urVc5d734wjITDzH689UmUoeMpdzwivqPgNqmb9DQEz4UVDnrO5XGrtX3329FWtBVtxztbO1vgNBQWYaAL0/REwABqyxYZRF4IO9qccpPCRu0OIJbxzhZbu/HWH377i3+8+c5vPvvpX669O/W2+c4B2SQlOTaX6PDdXz1k32E3mp4I3tyKtqOtza/uwvdQZuDHoaMNfH/snqfX+3df/td2tH0v2lr7/Q32/w6zXHKHtnX45NmD48idubXf3Xi9UA+HIYgORM+5LCgSqmvQ2ggVb0tMYTTyFIarLsJGT1sH8f05ahq3RAswoY4ocNUoxWQ4JEEbs3OdJBo7HAIqkhe3WsNhKcrzhdFoOIRowr0kY7OP0iLxT7RyXCgLwaFO8UgbF4zVtWj6IsHIDXIs+VVpfvhk/8GLoydPn83keTMjSImnKJFbjA7Ho6PRbJraHJOIuPpcVZUSowAq6ZY4CZXIIkUImrkQdQopSWDgzb09o9/B0Yx2xNu+lo7jUrKOu8JGPE0pFujHqpdGYVUVtVGpEW+M/bXE9Y80T9/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/lBOdwfggaoIs/jJGg0Tex/IGwt8ZJFrZROiiVCvpacrl+r61sGiistFwaTV1PIPcor+KUAlWVxKWgg1aAaq+MFrRSt6W7V0K52SVELUqd8AWSY/EPxZKUFAiqpSBLiDVcMrVlCWNaYUqrS1/39DRUupTobqeuyQcvwM8fVlY/z0jAQoTtJabwR1vv8FM98sTyaQwcgBtw71vOg4N3Jy4+mZUMc3EJEZJXvhczqr3DDPfDLfv7jwWlYmfFmhXncGm8Jqiy5qAR/nExkBLnzf/dp39T0Q4ILpKG1z74/V1OKKmb8pmVg5Th1TQLoRMqZfkPDnhXWruFWbYIvdrN7A9lBK6UrfL/YtQ3TtgUHIn+ujzuzHOVcrWQWG3/EXJrdxgR5xhWsb567cjoC4BWvmZpBLkaHxcIhbtH784dtogW4fqZuD53jGkwlgWdYVr+f+l+ixq/8C0/P96oNdt0b/61fZVa8KozZOTIveoZ9lmZE9zthm1+QnbjFxGz9qILtv8IVuH59xQqsPB/gPLotzol5g4FokUeaskN/oli/o20Sm2WPAme4Pc/usvsTAM2Toc+/SIp6C4de76gr3e6qL+/VPYlLTaCmI1VZcfKLMvfpy8UPslh8cz9z1TM/yvojzVsouMKfcsJpzcWtRqLSEc3/QE5a+sgiV0zbucZ979C44Otlc5IVjZqpXtutyxwSXkX8Kzk9OExTv7xbl90e59svNcYVO+0ICL9uOjqdcFm22/lIibybFkCz21Er7aMH/hDfPosj1tvpFd4sBxWX5eda2rrnXVta661spda+fa+/9d7cP+GQAA//9E8AqZly8AAA==", }, } + helmConfigMap2 = v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "helmtest2.v2", + Labels: map[string]string{ + "MODIFIED_AT": "1589922959", + "NAME": "kindled-toucan", + "OWNER": "TILLER", + "STATUS": "DEPLOYED", + "VERSION": "1", + }, + }, + Data: map[string]string{ + "release": "H4sIAAAAAAAC/+x7TWwcR3YwVobWdvnDB4cBFsgCC7wMtZDF9fTMUGtbaUAHSqRtIhI1IGktFrYh1XS/m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i6r6F2303J13e+7/srv+itfa3+lX7fzJOVX8OrPYi3Px+9X9VqoBpeiukLAKRsSX3vD4eW52GtqMrwo1jUaC++2mwhtJf+ba6/7sH/vew9u2n/m/u8AAAD//4XCOOBUPgAA", + }, + } helmSecret = v1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: "sh.helm.release.v1.helmtest.v1", @@ -81,12 +96,26 @@ var ( }, }, } + wantOutputNamespaced = []*api.Output{ + { + Name: "kindled-toucan/kindled-toucan-basic-demo", + Namespace: "demo1", + APIVersion: &api.Version{ + Name: "apps/v1", + Kind: "Deployment", + DeprecatedIn: "", + RemovedIn: "", + ReplacementAPI: "", + }, + }, + } ) -func newMockHelm(version string) *Helm { +func newMockHelm(version string, namespace string) *Helm { return &Helm{ - Version: version, - Kube: getMockConfigInstance(), + Version: version, + Namespace: namespace, + Kube: getMockConfigInstance(), } } @@ -136,6 +165,7 @@ func TestHelm_getManifestsVersionTwo(t *testing.T) { tests := []struct { name string helmVersion string + namespace string wantErr bool errMessage string configMap *v1.ConfigMap @@ -153,9 +183,23 @@ func TestHelm_getManifestsVersionTwo(t *testing.T) { configMap: &helmConfigMap, want: wantOutput, }, + { + name: "helm 2 other namespace", + namespace: "demo1", + helmVersion: "2", + configMap: &helmConfigMap, + want: nil, + }, + { + name: "helm 2 target namespace", + namespace: "demo1", + helmVersion: "2", + configMap: &helmConfigMap2, + want: wantOutputNamespaced, + }, } for _, tt := range tests { - h := newMockHelm(tt.helmVersion) + h := newMockHelm(tt.helmVersion, tt.namespace) if tt.configMap != nil { _, err := h.Kube.Client.CoreV1().ConfigMaps("kube-system").Create(tt.configMap) if err != nil { @@ -198,7 +242,7 @@ func TestHelm_getManifestsVersionThree(t *testing.T) { } for _, tt := range tests { - h := newMockHelm(tt.helmVersion) + h := newMockHelm(tt.helmVersion, "") if tt.secret != nil { _, err := h.Kube.Client.CoreV1().Secrets("default").Create(tt.secret) if err != nil { @@ -274,7 +318,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, "") err := h.FindVersions() if tt.wantErr { assert.EqualError(t, err, tt.errMessage)