secret analyzer fixed

This commit is contained in:
Matias Manavella
2020-09-29 11:42:21 -03:00
parent 437357f099
commit 53bd30755d
2 changed files with 2 additions and 2 deletions

View File

@@ -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
}

View File

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