Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jt-dd committed Sep 6, 2024
1 parent 941a075 commit 2372c46
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pkg/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ type Metrics struct {
}

type Metadata struct {
RunID string `json:"run_id"`
ClusterName string `json:"cluster"`
Metrics Metrics `json:"metrics"`
RunID string `json:"run_id"`
ClusterName string `json:"cluster"`
Metrics Metrics `json:"metrics"`
}
2 changes: 1 addition & 1 deletion pkg/collector/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
PodPath = "pods.json"
RolesPath = "roles.rbac.authorization.k8s.io.json"
RoleBindingsPath = "rolebindings.rbac.authorization.k8s.io.json"
MetadatPath = "metadata.json"
MetadataPath = "metadata.json"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/dump/ingestor.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func getClusterName(ctx context.Context, collector collector.CollectorClient) (s
}

func (d *DumpIngestor) Metadata() (collector.Metadata, error) {
path := filepath.Join(d.writer.OutputPath(), collector.MetadatPath)
path := filepath.Join(d.writer.OutputPath(), collector.MetadataPath)
data, err := os.ReadFile(path)
if err != nil {
return collector.Metadata{}, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/dump/pipeline/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewMetadataIngestor(ctx context.Context, dumpWriter writer.DumperWriter) *M

func (d *MetadataIngestor) DumpMetadata(ctx context.Context, metadata collector.Metadata) error {
data := make(map[string]*collector.Metadata)
data[collector.MetadatPath] = &metadata
data[collector.MetadataPath] = &metadata

return dumpObj[*collector.Metadata](ctx, data, d.writer)

Expand Down
3 changes: 2 additions & 1 deletion pkg/kubehound/core/core_ingest_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"path/filepath"

"github.com/DataDog/KubeHound/pkg/collector"
"github.com/DataDog/KubeHound/pkg/config"
"github.com/DataDog/KubeHound/pkg/ingestor/puller"
)
Expand All @@ -24,7 +25,7 @@ func CoreLocalIngest(ctx context.Context, khCfg *config.KubehoundConfig, resultP
if err != nil {
return err
}
metadataFilePath := filepath.Join(resultPath, "metadata.json")
metadataFilePath := filepath.Join(resultPath, collector.MetadataPath)
if compress {
tmpDir, err := os.MkdirTemp("/tmp/", "kh-local-ingest-*")
if err != nil {
Expand Down

0 comments on commit 2372c46

Please sign in to comment.