diff --git a/cmd/kubehound/ingest.go b/cmd/kubehound/ingest.go index 8605a9ed2..d40a9c5d4 100644 --- a/cmd/kubehound/ingest.go +++ b/cmd/kubehound/ingest.go @@ -74,9 +74,9 @@ var ( } ) +// If no arg is provided, run the reHydration of the latest snapshots (stored in KHaaS / S3 Bucket) func isIngestRemoteDefault() bool { - runID := viper.GetString(config.IngestorRunID) - clusterName := viper.GetString(config.IngestorClusterName) + clusterName := viper.GetString(config.DynamicClusterName) return runID == "" && clusterName == "" } diff --git a/pkg/config/collector.go b/pkg/config/collector.go index f669d606d..1f0a1bb73 100644 --- a/pkg/config/collector.go +++ b/pkg/config/collector.go @@ -18,7 +18,6 @@ const ( CollectorNonInteractive = "collector.non_interactive" CollectorFileArchiveNoCompress = "collector.file.archive.no_compress" CollectorFileDirectory = "collector.file.directory" - CollectorFileClusterName = "collector.file.cluster_name" CollectorFileBlobRegion = "collector.file.blob.region" CollectorFileBlobBucket = "collector.file.blob.bucket" ) diff --git a/pkg/config/ingestor.go b/pkg/config/ingestor.go index 675c306ed..91c9c2c16 100644 --- a/pkg/config/ingestor.go +++ b/pkg/config/ingestor.go @@ -10,8 +10,6 @@ const ( IngestorAPIEndpoint = "ingestor.api.endpoint" IngestorAPIInsecure = "ingestor.api.insecure" - IngestorClusterName = "ingestor.cluster_name" - IngestorRunID = "ingestor.run_id" IngestorMaxArchiveSize = "ingestor.max_archive_size" IngestorTempDir = "ingestor.temp_dir" IngestorArchiveName = "ingestor.archive_name" diff --git a/pkg/ingestor/api/api.go b/pkg/ingestor/api/api.go index 3e60cdd0f..940011656 100644 --- a/pkg/ingestor/api/api.go +++ b/pkg/ingestor/api/api.go @@ -124,7 +124,7 @@ func (g *IngestorAPI) Ingest(_ context.Context, path string) error { if err != nil { log.I.Warnf("no metadata has been parsed (old dump format from v1.4.0 or below do not embed metadata information): %v", err) // Backward Compatibility: Extracting the metadata from the path - dumpMetadata, err := dump.ParsePath(archivePath) + dumpMetadata, err := dump.ParsePath(path) if err != nil { log.I.Warn("parsing path for metadata", err) diff --git a/test/system/setup_test.go b/test/system/setup_test.go index b35bd6a17..d949acf8c 100644 --- a/test/system/setup_test.go +++ b/test/system/setup_test.go @@ -143,7 +143,6 @@ func RunLocal(ctx context.Context, runArgs *runArgs, compress bool, p *providers // Setting the collectorDir, clusterName and runID needed for the ingestion step // This information is used by the grpc server to run the ingestion viper.Set(config.CollectorFileDirectory, collectorDir) - viper.Set(config.CollectorFileClusterName, clusterName) err := cmd.InitializeKubehoundConfig(ctx, KubeHoundThroughDumpConfigPath, false, false) if err != nil {