From 36b0bfd3729a376ee10c953bf3e630830979358d Mon Sep 17 00:00:00 2001 From: William Yu <7888158+wiyu@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:24:05 -0500 Subject: [PATCH] [process-agent] explicitly invoke the tagger component to fix container tagging (#23001) [process-agent] explicitly invoke the tagger component to fix container tagging --- cmd/process-agent/command/main_common.go | 3 +++ cmd/process-agent/subcommands/check/check.go | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cmd/process-agent/command/main_common.go b/cmd/process-agent/command/main_common.go index 2f329219c07ef..bcb5e23c494a7 100644 --- a/cmd/process-agent/command/main_common.go +++ b/cmd/process-agent/command/main_common.go @@ -165,6 +165,9 @@ func runApp(ctx context.Context, globalParams *GlobalParams) error { profiler.Component, expvars.Component, apiserver.Component, + // TODO: This is needed by the container-provider which is not currently a component. + // We should ensure the tagger is a dependency when converting to a component. + tagger.Component, ) { }), diff --git a/cmd/process-agent/subcommands/check/check.go b/cmd/process-agent/subcommands/check/check.go index fb79193b91d59..9da263ea5f1cd 100644 --- a/cmd/process-agent/subcommands/check/check.go +++ b/cmd/process-agent/subcommands/check/check.go @@ -51,10 +51,14 @@ type dependencies struct { CliParams *cliParams - Config config.Component - Syscfg sysprobeconfig.Component - Log log.Component - Hostinfo hostinfo.Component + Config config.Component + Syscfg sysprobeconfig.Component + Log log.Component + Hostinfo hostinfo.Component + // TODO: the tagger is used by the ContainerProvider, which is currently not a component so there is no direct + // dependency on it. The ContainerProvider needs to be componentized so it can be injected and have fx manage its + // lifecycle. + Tagger tagger.Component WorkloadMeta workloadmeta.Component Checks []types.CheckComponent `group:"check"` }