From 1e8e20a29575a3d4c6b1515f66764b7ffc200d5a Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Fri, 13 Nov 2020 21:01:02 +0000 Subject: [PATCH] Ceph collector does not need a name property --- pkg/apis/troubleshoot/v1beta2/collector_shared.go | 1 - pkg/collect/ceph.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/apis/troubleshoot/v1beta2/collector_shared.go b/pkg/apis/troubleshoot/v1beta2/collector_shared.go index d4370a48..b7aad787 100644 --- a/pkg/apis/troubleshoot/v1beta2/collector_shared.go +++ b/pkg/apis/troubleshoot/v1beta2/collector_shared.go @@ -135,7 +135,6 @@ type Collectd struct { type Ceph struct { CollectorMeta `json:",inline" yaml:",inline"` - Name string `json:"name,omitempty" yaml:"name,omitempty"` Namespace string `json:"namespace" yaml:"namespace"` Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"` } diff --git a/pkg/collect/ceph.go b/pkg/collect/ceph.go index df2ecdf8..fa733e24 100644 --- a/pkg/collect/ceph.go +++ b/pkg/collect/ceph.go @@ -114,7 +114,7 @@ func cephCommandExec(ctx context.Context, c *Collector, cephCollector *troublesh final := map[string][]byte{} for filename, result := range results { - pathPrefix := GetCephCollectorFilepath(cephCollector.Name, cephCollector.Namespace) + pathPrefix := GetCephCollectorFilepath(cephCollector.CollectorName, cephCollector.Namespace) switch { case strings.HasSuffix(filename, "-stdout.txt"): final[path.Join(pathPrefix, fmt.Sprintf("%s.%s", command.ID, command.Format))] = result