Documentation
¶
Overview ¶
Package config implements a component to handle agent configuration. This component temporarily wraps pkg/config.
This component initializes pkg/config based on the bundle params, and will return the same results as that package. This is to support migration to a component architecture. When no code still uses pkg/config, that package will be removed.
Index ¶
- Constants
- func Module() fxutil.Module
- func WithCLIOverride(setting string, value interface{}) func(*Params)
- func WithConfFilePath(confFilePath string) func(*Params)
- func WithConfigLoadSecurityAgent(configLoadSecurityAgent bool) func(*Params)
- func WithConfigName(name string) func(*Params)
- func WithExtraConfFiles(extraConfFilePath []string) func(*Params)
- func WithFleetPoliciesDirPath(fleetPoliciesDirPath string) func(*Params)
- func WithIgnoreErrors(v bool) func(*Params)
- func WithSecurityAgentConfigFilePaths(securityAgentConfigFilePaths []string) func(*Params)
- type Component
- type Params
- func NewAgentParams(confFilePath string, options ...func(*Params)) Params
- func NewClusterAgentParams(configFilePath string, options ...func(*Params)) Params
- func NewParams(defaultConfPath string, options ...func(*Params)) Params
- func NewSecurityAgentParams(securityAgentConfigFilePaths []string, options ...func(*Params)) Params
- type Reader
Constants ¶
const (
// DefaultConfPath points to the folder containing datadog.yaml
DefaultConfPath = "/etc/datadog-agent"
)
Variables ¶
This section is empty.
Functions ¶
func WithCLIOverride ¶ added in v0.58.0
WithCLIOverride registers a list of settings overrides from the CLI for the configuration. The map associate settings name like "logs_config.enabled" to its value.
func WithConfFilePath ¶
WithConfFilePath returns an option which sets ConfFilePath
func WithConfigLoadSecurityAgent ¶
WithConfigLoadSecurityAgent returns an option which sets configLoadSecurityAgent
func WithConfigName ¶
WithConfigName returns an option which sets the config name
func WithExtraConfFiles ¶ added in v0.56.0
WithExtraConfFiles returns an option which sets ConfFilePath
func WithFleetPoliciesDirPath ¶ added in v0.57.0
WithFleetPoliciesDirPath returns an option which sets FleetPoliciesDirPath
func WithIgnoreErrors ¶
WithIgnoreErrors returns an option which sets ignoreErrors
func WithSecurityAgentConfigFilePaths ¶
WithSecurityAgentConfigFilePaths returns an option which sets securityAgentConfigFilePaths
Types ¶
type Component ¶
type Component interface {
pkgconfigmodel.ReaderWriter
// Warnings returns config warnings collected during setup.
Warnings() *pkgconfigmodel.Warnings
}
Component is the component type.
func NewServerlessConfig ¶
NewServerlessConfig initializes a config component from the given config file TODO: serverless must be eventually migrated to fx, this workaround will then become obsolete - ts should not be created directly in this fashion.
type Params ¶
type Params struct {
// ConfFilePath is the path at which to look for configuration, usually
// given by the --cfgpath command-line flag.
ConfFilePath string
// ExtraConfFilePath represents the paths to additional configuration files to be merged over the main datadog.yaml.
// Usually given by the --extracfgpath command-line flag.
ExtraConfFilePath []string
// FleetPoliciesDirPath is the path at which to look for remote configuration files
FleetPoliciesDirPath string
// contains filtered or unexported fields
}
Params defines the parameters for the config component.
func NewAgentParams ¶
NewAgentParams creates a new instance of Params for the Agent.
func NewClusterAgentParams ¶
NewClusterAgentParams returns a new Params struct for the cluster agent
func NewSecurityAgentParams ¶
NewSecurityAgentParams creates a new instance of Params for the Security Agent.
type Reader ¶
type Reader = pkgconfigmodel.Reader //nolint:revive
Reader is a subset of Config that only allows reading of configuration