Skip to content

Commit

Permalink
[DCA] Convert commands to Fx apps
Browse files Browse the repository at this point in the history
  • Loading branch information
juliogreff committed Jan 16, 2023
1 parent a334ca9 commit a6ad999
Show file tree
Hide file tree
Showing 43 changed files with 1,139 additions and 1,852 deletions.
17 changes: 14 additions & 3 deletions cmd/cluster-agent-cloudfoundry/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ import (
"github.com/DataDog/datadog-agent/cmd/agent/common"
"github.com/DataDog/datadog-agent/cmd/cluster-agent/api"
dcav1 "github.com/DataDog/datadog-agent/cmd/cluster-agent/api/v1"
"github.com/DataDog/datadog-agent/cmd/cluster-agent/commands"
"github.com/DataDog/datadog-agent/pkg/aggregator"
"github.com/DataDog/datadog-agent/pkg/api/healthprobe"
clustercheckscmd "github.com/DataDog/datadog-agent/pkg/cli/subcommands/clusterchecks"
"github.com/DataDog/datadog-agent/pkg/cli/subcommands/dcaconfigcheck"
"github.com/DataDog/datadog-agent/pkg/clusteragent"
"github.com/DataDog/datadog-agent/pkg/clusteragent/clusterchecks"
"github.com/DataDog/datadog-agent/pkg/collector"
Expand Down Expand Up @@ -98,8 +99,18 @@ func init() {
// attach the commands to the root
ClusterAgentCmd.AddCommand(runCmd)
ClusterAgentCmd.AddCommand(versionCmd)
ClusterAgentCmd.AddCommand(commands.GetClusterChecksCobraCmd(&flagNoColor, &confPath, loggerName))
ClusterAgentCmd.AddCommand(commands.GetConfigCheckCobraCmd(&flagNoColor, &confPath, loggerName))

ClusterAgentCmd.AddCommand(clustercheckscmd.MakeCommand(func() clustercheckscmd.GlobalParams {
return clustercheckscmd.GlobalParams{
ConfFilePath: confPath,
}
}))

ClusterAgentCmd.AddCommand(dcaconfigcheck.MakeCommand(func() dcaconfigcheck.GlobalParams {
return dcaconfigcheck.GlobalParams{
ConfFilePath: confPath,
}
}))

ClusterAgentCmd.PersistentFlags().StringVarP(&confPath, "cfgpath", "c", "", "path to directory containing datadog.yaml")
ClusterAgentCmd.PersistentFlags().BoolVarP(&flagNoColor, "no-color", "n", false, "disable color output")
Expand Down
17 changes: 0 additions & 17 deletions cmd/cluster-agent/app/check.go

This file was deleted.

18 changes: 0 additions & 18 deletions cmd/cluster-agent/app/clusterchecks.go

This file was deleted.

81 changes: 0 additions & 81 deletions cmd/cluster-agent/app/config.go

This file was deleted.

15 changes: 0 additions & 15 deletions cmd/cluster-agent/app/config_check.go

This file was deleted.

58 changes: 0 additions & 58 deletions cmd/cluster-agent/app/diagnose.go

This file was deleted.

15 changes: 0 additions & 15 deletions cmd/cluster-agent/app/dummy.go

This file was deleted.

17 changes: 0 additions & 17 deletions cmd/cluster-agent/app/health.go

This file was deleted.

111 changes: 0 additions & 111 deletions cmd/cluster-agent/app/metadata_mapper_digest.go

This file was deleted.

19 changes: 0 additions & 19 deletions cmd/cluster-agent/app/secret_helper.go

This file was deleted.

Loading

0 comments on commit a6ad999

Please sign in to comment.