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 := ""