config

package
v0.0.0-...-eefd2de Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 17 Imported by: 9

Documentation

Index

Constants

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

	// 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"
	DDInfraInitOnly                         = "initOnly"

	// Agent Namespace
	DDAgentDeployParamName               = "deploy"
	DDAgentDeployWithOperatorParamName   = "deployWithOperator"
	DDAgentVersionParamName              = "version"
	DDAgentPipelineID                    = "pipeline_id"
	DDAgentCommitSHA                     = "commit_sha"
	DDAgentFullImagePathParamName        = "fullImagePath"
	DDClusterAgentVersionParamName       = "clusterAgentVersion"
	DDClusterAgentFullImagePathParamName = "clusterAgentFullImagePath"
	DDOperatorVersionParamName           = "operatorVersion"
	DDOperatorFullImagePathParamName     = "operatorFullImagePath"
	DDImagePullRegistryParamName         = "imagePullRegistry"
	DDImagePullUsernameParamName         = "imagePullUsername"
	DDImagePullPasswordParamName         = "imagePullPassword"
	DDAgentAPIKeyParamName               = "apiKey"
	DDAgentAPPKeyParamName               = "appKey"
	DDAgentFakeintake                    = "fakeintake"
	DDAgentSite                          = "site"
	DDAgentMajorVersion                  = "majorVersion"
	DDAgentExtraEnvVars                  = "extraEnvVars" // extraEnvVars is expected in the format: <key1>=<value1>,<key2>=<value2>,...

	// Updater Namespace
	DDUpdaterParamName = "deploy"

	// Testing workload namerNamespace
	DDTestingWorkloadDeployParamName = "deploy"

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

	DefaultMajorVersion = "7"
)

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 OperatorSemverVersion

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

Types

type CloudEnv

type CloudEnv interface {
	InternalDockerhubMirror() string
	InternalRegistry() string
	InternalRegistryImageTagExists(image, tag string) (bool, error)
}

type CommonEnvironment

type CommonEnvironment struct {
	InfraConfig           *sdkconfig.Config
	AgentConfig           *sdkconfig.Config
	TestingWorkloadConfig *sdkconfig.Config
	DogstatsdConfig       *sdkconfig.Config
	UpdaterConfig         *sdkconfig.Config
	OperatorConfig        *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) AgentDeployWithOperator

func (e *CommonEnvironment) AgentDeployWithOperator() bool

func (*CommonEnvironment) AgentExtraEnvVars

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

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) InitOnly

func (e *CommonEnvironment) InitOnly() bool

func (*CommonEnvironment) KubernetesVersion

func (e *CommonEnvironment) KubernetesVersion() string

func (*CommonEnvironment) MajorVersion

func (e *CommonEnvironment) MajorVersion() string

func (*CommonEnvironment) OperatorFullImagePath

func (e *CommonEnvironment) OperatorFullImagePath() string

func (*CommonEnvironment) OperatorVersion

func (e *CommonEnvironment) OperatorVersion() 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
	AgentExtraEnvVars() map[string]string

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

	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"
	ProviderGCP     ProviderID = "gcp"
)

Jump to

Keyboard shortcuts

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