config

package
v0.0.0-...-3b71e7f Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DDInfraConfigNamespace     = "ddinfra"
	DDAgentConfigNamespace     = "ddagent"
	DDTestingWorkloadNamespace = "ddtestworkload"
	DDDogstatsdNamespace       = "dddogstatsd"
	DDUpdaterConfigNamespace   = "ddupdater"

	// Infra namespace
	DDInfraEnvironment                      = "env"
	DDInfraKubernetesVersion                = "kubernetesVersion"
	DDInfraOSDescriptor                     = "osDescriptor" // osDescriptor is expected in the format: <osFamily>:<osVersion>:<osArch>, see components/os/descriptor.go
	DDInfraOSImageID                        = "osImageID"
	DDInfraDeployFakeintakeWithLoadBalancer = "deployFakeintakeWithLoadBalancer"
	DDInfraExtraResourcesTags               = "extraResourcesTags"
	DDInfraSSHUser                          = "sshUser"

	// Agent Namespace
	DDAgentDeployParamName               = "deploy"
	DDAgentVersionParamName              = "version"
	DDAgentPipelineID                    = "pipeline_id"
	DDAgentCommitSHA                     = "commit_sha"
	DDAgentFullImagePathParamName        = "fullImagePath"
	DDClusterAgentVersionParamName       = "clusterAgentVersion"
	DDClusterAgentFullImagePathParamName = "clusterAgentFullImagePath"
	DDImagePullRegistryParamName         = "imagePullRegistry"
	DDImagePullUsernameParamName         = "imagePullUsername"
	DDImagePullPasswordParamName         = "imagePullPassword"
	DDAgentAPIKeyParamName               = "apiKey"
	DDAgentAPPKeyParamName               = "appKey"
	DDAgentFakeintake                    = "fakeintake"
	DDAgentSite                          = "site"

	// Updater Namespace
	DDUpdaterParamName = "deploy"

	// Testing workload namerNamespace
	DDTestingWorkloadDeployParamName = "deploy"

	// Dogstatsd namespace
	DDDogstatsdDeployParamName        = "deploy"
	DDDogstatsdFullImagePathParamName = "fullImagePath"
)

Variables

This section is empty.

Functions

func AgentSemverVersion

func AgentSemverVersion(e Env) (*semver.Version, error)

func ClusterAgentSemverVersion

func ClusterAgentSemverVersion(e Env) (*semver.Version, error)

func EnvVariableResourceTags

func EnvVariableResourceTags() map[string]string

func FindEnvironmentName

func FindEnvironmentName(environments []string, prefix string) string

func SetConfigDefaultValue

func SetConfigDefaultValue(config auto.ConfigMap, key, value string)

Types

type CloudEnv

type CloudEnv interface {
	InternalDockerhubMirror() string
	InternalRegistry() string
}

type CommonEnvironment

type CommonEnvironment struct {
	InfraConfig           *sdkconfig.Config
	AgentConfig           *sdkconfig.Config
	TestingWorkloadConfig *sdkconfig.Config
	DogstatsdConfig       *sdkconfig.Config
	UpdaterConfig         *sdkconfig.Config
	// contains filtered or unexported fields
}

func NewCommonEnvironment

func NewCommonEnvironment(ctx *pulumi.Context) (CommonEnvironment, error)

func (*CommonEnvironment) AgentAPIKey

func (e *CommonEnvironment) AgentAPIKey() pulumi.StringOutput

func (*CommonEnvironment) AgentAPPKey

func (e *CommonEnvironment) AgentAPPKey() pulumi.StringOutput

func (*CommonEnvironment) AgentDeploy

func (e *CommonEnvironment) AgentDeploy() bool

Agent Namespace

func (*CommonEnvironment) AgentFullImagePath

func (e *CommonEnvironment) AgentFullImagePath() string

func (*CommonEnvironment) AgentUseFakeintake

func (e *CommonEnvironment) AgentUseFakeintake() bool

func (*CommonEnvironment) AgentVersion

func (e *CommonEnvironment) AgentVersion() string

func (*CommonEnvironment) ClusterAgentFullImagePath

func (e *CommonEnvironment) ClusterAgentFullImagePath() string

func (*CommonEnvironment) ClusterAgentVersion

func (e *CommonEnvironment) ClusterAgentVersion() string

func (*CommonEnvironment) CommitSHA

func (e *CommonEnvironment) CommitSHA() string

func (*CommonEnvironment) CommonNamer

func (e *CommonEnvironment) CommonNamer() namer.Namer

func (*CommonEnvironment) Ctx

func (e *CommonEnvironment) Ctx() *pulumi.Context

func (*CommonEnvironment) DefaultResourceTags

func (e *CommonEnvironment) DefaultResourceTags() map[string]string

func (*CommonEnvironment) DogstatsdDeploy

func (e *CommonEnvironment) DogstatsdDeploy() bool

Dogstatsd namespace

func (*CommonEnvironment) DogstatsdFullImagePath

func (e *CommonEnvironment) DogstatsdFullImagePath() string

func (*CommonEnvironment) ExtraResourcesTags

func (e *CommonEnvironment) ExtraResourcesTags() map[string]string

func (*CommonEnvironment) GetBoolWithDefault

func (e *CommonEnvironment) GetBoolWithDefault(config *sdkconfig.Config, paramName string, defaultValue bool) bool

Generic methods

func (*CommonEnvironment) GetIntWithDefault

func (e *CommonEnvironment) GetIntWithDefault(config *sdkconfig.Config, paramName string, defaultValue int) int

func (*CommonEnvironment) GetObjectWithDefault

func (e *CommonEnvironment) GetObjectWithDefault(config *sdkconfig.Config, paramName string, outputValue, defaultValue interface{}) interface{}

func (*CommonEnvironment) GetProvider

func (p *CommonEnvironment) GetProvider(providerID ProviderID) pulumi.ProviderResource

func (*CommonEnvironment) GetStringListWithDefault

func (e *CommonEnvironment) GetStringListWithDefault(config *sdkconfig.Config, paramName string, defaultValue []string) []string

func (*CommonEnvironment) GetStringWithDefault

func (e *CommonEnvironment) GetStringWithDefault(config *sdkconfig.Config, paramName string, defaultValue string) string

func (*CommonEnvironment) ImagePullPassword

func (e *CommonEnvironment) ImagePullPassword() pulumi.StringOutput

func (*CommonEnvironment) ImagePullRegistry

func (e *CommonEnvironment) ImagePullRegistry() string

func (*CommonEnvironment) ImagePullUsername

func (e *CommonEnvironment) ImagePullUsername() string

func (*CommonEnvironment) InfraEnvironmentNames

func (e *CommonEnvironment) InfraEnvironmentNames() []string

func (*CommonEnvironment) InfraOSDescriptor

func (e *CommonEnvironment) InfraOSDescriptor() string

func (*CommonEnvironment) InfraOSImageID

func (e *CommonEnvironment) InfraOSImageID() string

func (*CommonEnvironment) InfraSSHUser

func (e *CommonEnvironment) InfraSSHUser() string

func (*CommonEnvironment) InfraShouldDeployFakeintakeWithLB

func (e *CommonEnvironment) InfraShouldDeployFakeintakeWithLB() bool

func (*CommonEnvironment) KubernetesVersion

func (e *CommonEnvironment) KubernetesVersion() string

func (*CommonEnvironment) PipelineID

func (e *CommonEnvironment) PipelineID() string

func (*CommonEnvironment) RegisterProvider

func (p *CommonEnvironment) RegisterProvider(providerID ProviderID, provider pulumi.ProviderResource)

func (*CommonEnvironment) ResourcesTags

func (e *CommonEnvironment) ResourcesTags() pulumi.StringMap

func (*CommonEnvironment) Site

func (e *CommonEnvironment) Site() string

func (*CommonEnvironment) TestingWorkloadDeploy

func (e *CommonEnvironment) TestingWorkloadDeploy() bool

Testing workload namespace

func (*CommonEnvironment) UpdaterDeploy

func (e *CommonEnvironment) UpdaterDeploy() bool

Updater namespace

func (*CommonEnvironment) WithProvider

func (p *CommonEnvironment) WithProvider(providerID ProviderID) pulumi.InvokeOption

func (*CommonEnvironment) WithProviders

func (p *CommonEnvironment) WithProviders(providerID ...ProviderID) pulumi.ResourceOption

type Env

type Env interface {
	Ctx() *pulumi.Context
	CommonNamer() namer.Namer

	InfraShouldDeployFakeintakeWithLB() bool
	InfraEnvironmentNames() []string
	InfraOSDescriptor() string
	InfraOSImageID() string
	KubernetesVersion() string
	DefaultResourceTags() map[string]string
	ExtraResourcesTags() map[string]string
	ResourcesTags() pulumi.StringMap

	AgentDeploy() bool
	AgentVersion() string
	PipelineID() string
	CommitSHA() string
	ClusterAgentVersion() string
	AgentFullImagePath() string
	ClusterAgentFullImagePath() string
	ImagePullRegistry() string
	ImagePullUsername() string
	ImagePullPassword() pulumi.StringOutput
	AgentAPIKey() pulumi.StringOutput
	AgentAPPKey() pulumi.StringOutput
	AgentUseFakeintake() bool
	TestingWorkloadDeploy() bool
	DogstatsdDeploy() bool
	DogstatsdFullImagePath() string
	UpdaterDeploy() bool

	GetBoolWithDefault(config *sdkconfig.Config, paramName string, defaultValue bool) bool
	GetStringListWithDefault(config *sdkconfig.Config, paramName string, defaultValue []string) []string
	GetStringWithDefault(config *sdkconfig.Config, paramName string, defaultValue string) string
	GetObjectWithDefault(config *sdkconfig.Config, paramName string, outputValue, defaultValue interface{}) interface{}
	GetIntWithDefault(config *sdkconfig.Config, paramName string, defaultValue int) int

	CloudEnv
	// contains filtered or unexported methods
}

type ProviderID

type ProviderID string
const (
	ProviderRandom  ProviderID = "random"
	ProviderTLS     ProviderID = "tls"
	ProviderCommand ProviderID = "command"
	ProviderAWS     ProviderID = "aws"
	ProviderAWSX    ProviderID = "awsx"
	ProviderEKS     ProviderID = "eks"
	ProviderAzure   ProviderID = "azure"
	ProviderDocker  ProviderID = "docker"
)

Jump to

Keyboard shortcuts

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