Skip to content

Commit

Permalink
remove now outdated comment and old security agent check
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Dec 11, 2024
1 parent d9ab04e commit f736348
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions comp/core/workloadmeta/collectors/catalog/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (
"go.uber.org/fx"

remoteworkloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/remote/workloadmeta"
workloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/def"
"github.com/DataDog/datadog-agent/pkg/util/flavor"
)

// GetCatalog returns the set of FX options to populate the catalog
Expand All @@ -30,22 +28,8 @@ func GetCatalog() fx.Option {
return fx.Options(opts...)
}

// TODO: (components) Move remote-only to its own catalog, similar to how catalog-less works
// Depend on this catalog-remote using fx, instead of build tags

func remoteWorkloadmetaParams() fx.Option {
var filter *workloadmeta.Filter // Nil filter accepts everything

// Security Agent is only interested in containers
// TODO: (components) create a Catalog component, the implementation used by
// security-agent can use this filter, instead of needing to chekc agent.flavor
if flavor.GetFlavor() == flavor.SecurityAgent {
filter = workloadmeta.NewFilterBuilder().AddKind(workloadmeta.KindContainer).Build()
}

return fx.Provide(func() remoteworkloadmeta.Params {
return remoteworkloadmeta.Params{
Filter: filter,
}
return remoteworkloadmeta.Params{}
})
}

0 comments on commit f736348

Please sign in to comment.