mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
Merge pull request #283 from manavellamnimble/fixFilePath
Filepath fixed
This commit is contained in:
@@ -2,6 +2,7 @@ package collect
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"k8s.io/apimachinery/pkg/version"
|
||||
@@ -23,8 +24,8 @@ func ClusterInfo(c *Collector) (map[string][]byte, error) {
|
||||
|
||||
// cluster version
|
||||
clusterVersion, clusterErrors := clusterVersion(client)
|
||||
clusterInfoOutput["cluster-info/cluster_version.json"] = clusterVersion
|
||||
clusterInfoOutput["cluster-info/errors.json"], err = marshalNonNil(clusterErrors)
|
||||
clusterInfoOutput[filepath.Join("cluster-info", "cluster_version.json")] = clusterVersion
|
||||
clusterInfoOutput[filepath.Join("cluster-info", "errors.json")], err = marshalNonNil(clusterErrors)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to marshal errors")
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
||||
troubleshootv1beta2 "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2"
|
||||
@@ -37,10 +36,10 @@ func Secret(c *Collector, secretCollector *troubleshootv1beta2.Secret) (map[stri
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
secretOutput[path.Join("secrets-errors", filePath)] = errorBytes
|
||||
secretOutput[filepath.Join("secrets-errors", filePath)] = errorBytes
|
||||
}
|
||||
if encoded != nil {
|
||||
secretOutput[path.Join("secrets", filePath)] = encoded
|
||||
secretOutput[filepath.Join("secrets", filePath)] = encoded
|
||||
}
|
||||
|
||||
return secretOutput, nil
|
||||
|
||||
Reference in New Issue
Block a user