agentparams

package
v0.0.0-...-acf68d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

View Source
const (
	StableChannel  channel = "stable"
	BetaChannel    channel = "beta"
	NightlyChannel channel = "nightly"
)
View Source
const (
	DefaultFlavor = BaseFlavor
	BaseFlavor    = "datadog-agent"
	FIPSFlavor    = "datadog-fips-agent"
)

Agent flavor constants

PackageVersion.Flavor is in some cases passed directly to underlying install scripts, so this list is not exhaustive.

See PackageFlavor https://github.com/DataDog/agent-release-management/blob/main/generator/const.py

Variables

This section is empty.

Functions

func WithAdditionalInstallParameters

func WithAdditionalInstallParameters(parameters []string) func(*Params) error

WithAdditionalInstallParameters passes a list of parameters to the underlying installer

func WithAgentConfig

func WithAgentConfig(config string) func(*Params) error

WithAgentConfig sets the configuration of the Agent.

func WithFakeintake

func WithFakeintake(fakeintake *fakeintake.Fakeintake) func(*Params) error

WithFakeintake installs the fake intake and configures the Agent to use it.

This option is overwritten by `WithIntakeHostname`.

func WithFile

func WithFile(absolutePath string, content string, useSudo bool) func(*Params) error

WithFile adds a file with contents to the install at the given path. This should only be used when the agent needs to be restarted after writing the file.

func WithFileWithPermissions

func WithFileWithPermissions(absolutePath string, content string, useSudo bool, perms optional.Option[perms.FilePermissions]) func(*Params) error

WithFileWithPermissions adds a file like WithFile but we can predefine the permissions of the file.

func WithFlavor

func WithFlavor(flavor string) func(*Params) error

WithFlavor use a specific flavor of the Agent. For example: `datadog-fips-agent`

See PackageFlavor https://github.com/DataDog/agent-release-management/blob/main/generator/const.py

func WithHostname

func WithHostname(hostname string) func(*Params) error

WithHostname add hostname to the agent configuration

func WithIntakeHostname

func WithIntakeHostname(hostname string) func(*Params) error

WithIntakeName configures the agent to use the given hostname as intake.

To use a fakeintake, see WithFakeintake.

This option is overwritten by `WithFakeintake`.

func WithIntegration

func WithIntegration(folderName string, content string) func(*Params) error

WithIntegration adds the configuration for an integration.

func WithLatest

func WithLatest() func(*Params) error

WithLatest uses the latest Agent 7 version in the stable channel.

func WithLatestNightly

func WithLatestNightly() func(*Params) error

func WithLogs

func WithLogs() func(*Params) error

WithLogs enables the log agent

func WithMajorVersion

func WithMajorVersion(majorVersion string) func(*Params) error

WithMajorVersion specify the major version of the Agent

func WithPipeline

func WithPipeline(pipelineID string) func(*Params) error

WithPipeline use a specific version of the Agent by pipeline id

func WithPulumiResourceOptions

func WithPulumiResourceOptions(resources ...pulumi.ResourceOption) func(*Params) error

func WithSecurityAgentConfig

func WithSecurityAgentConfig(config string) func(*Params) error

WithSecurityAgentConfig sets the configuration of the security-agent.

func WithSkipAPIKeyInConfig

func WithSkipAPIKeyInConfig() func(*Params) error

WithSkipAPIKeyInConfig does not add the API key in the Agent configuration file.

func WithSystemProbeConfig

func WithSystemProbeConfig(config string) func(*Params) error

WithSystemProbeConfig sets the configuration of system-probe.

func WithTags

func WithTags(tags []string) func(*Params) error

WithTags add tags to the agent configuration

func WithTelemetry

func WithTelemetry() func(*Params) error

WithTelemetry enables the Agent telemetry go_expvar and openmetrics.

func WithVersion

func WithVersion(version string) func(*Params) error

WithVersion use a specific version of the Agent. For example: `6.39.0` or `7.41.0~rc.7-1`

Types

type FileDefinition

type FileDefinition struct {
	Content     string
	UseSudo     bool
	Permissions optional.Option[perms.FilePermissions]
}

type Option

type Option = func(*Params) error

type PackageVersion

type PackageVersion struct {
	Major      string
	Minor      string // Empty means latest
	Channel    channel
	PipelineID string
	Flavor     string // Empty means default (base)
}

type Params

type Params struct {
	Version             PackageVersion
	AgentConfig         string
	SystemProbeConfig   string
	SecurityAgentConfig string
	Integrations        map[string]*FileDefinition
	Files               map[string]*FileDefinition
	ExtraAgentConfig    []pulumi.StringInput
	ResourceOptions     []pulumi.ResourceOption
	// This is a list of additional installer flags that can be used to pass installer-specific
	// parameters like the MSI flags.
	AdditionalInstallParameters []string
	SkipAPIKeyInConfig          bool
}

func NewParams

func NewParams(env config.Env, options ...Option) (*Params, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL