From 53bd30755dabbac4964b80b853dee6329dbdc4b5 Mon Sep 17 00:00:00 2001 From: Matias Manavella Date: Tue, 29 Sep 2020 11:42:21 -0300 Subject: [PATCH] secret analyzer fixed --- pkg/analyze/secret.go | 2 +- pkg/collect/secret.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/analyze/secret.go b/pkg/analyze/secret.go index 475b4cfb..012289c8 100644 --- a/pkg/analyze/secret.go +++ b/pkg/analyze/secret.go @@ -9,7 +9,7 @@ import ( ) func analyzeSecret(analyzer *troubleshootv1beta2.AnalyzeSecret, getCollectedFileContents func(string) ([]byte, error)) (*AnalyzeResult, error) { - secretData, err := getCollectedFileContents(fmt.Sprintf("secrets/%s/%s/%s.json", analyzer.Namespace, analyzer.SecretName, analyzer.Key)) + secretData, err := getCollectedFileContents(fmt.Sprintf("secrets/%s/%s.json", analyzer.Namespace, analyzer.SecretName)) if err != nil { return nil, err } diff --git a/pkg/collect/secret.go b/pkg/collect/secret.go index 931da8e4..5fab9b53 100644 --- a/pkg/collect/secret.go +++ b/pkg/collect/secret.go @@ -67,7 +67,7 @@ func secret(ctx context.Context, client *kubernetes.Clientset, secretCollector * } ns = found.Namespace - path = fmt.Sprintf("%s.json", filepath.Join(ns, secretCollector.SecretName, secretCollector.Key)) + path = fmt.Sprintf("%s.json", filepath.Join(ns, secretCollector.SecretName)) keyExists := false keyData := ""