global

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 38 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FIPSProxyCustomConfigVolumeName = "fips-proxy-cfg"
	FIPSProxyCustomConfigFileName   = "datadog-fips-proxy.cfg"
	FIPSProxyCustomConfigMapName    = "%s-fips-config"
	FIPSProxyCustomConfigMountPath  = "/etc/datadog-fips-proxy/datadog-fips-proxy.cfg"

	InstallInfoToolVersion = "DD_TOOL_VERSION"
)
View Source
const (
	DDChecksTagCardinality                 = "DD_CHECKS_TAG_CARDINALITY"
	DDClusterAgentAuthToken                = "DD_CLUSTER_AGENT_AUTH_TOKEN"
	DDCriSocketPath                        = "DD_CRI_SOCKET_PATH"
	DDFIPSEnabled                          = "DD_FIPS_ENABLED"
	DDFIPSPortRangeStart                   = "DD_FIPS_PORT_RANGE_START"
	DDFIPSUseHTTPS                         = "DD_FIPS_HTTPS"
	DDFIPSLocalAddress                     = "DD_FIPS_LOCAL_ADDRESS"
	DDKubeletCAPath                        = "DD_KUBELET_CLIENT_CA"
	DDKubeletTLSVerify                     = "DD_KUBELET_TLS_VERIFY"
	DDKubernetesPodResourcesSocket         = "DD_KUBERNETES_KUBELET_PODRESOURCES_SOCKET"
	DDNamespaceLabelsAsTags                = "DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS"
	DDNamespaceAnnotationsAsTags           = "DD_KUBERNETES_NAMESPACE_ANNOTATIONS_AS_TAGS"
	DDNodeLabelsAsTags                     = "DD_KUBERNETES_NODE_LABELS_AS_TAGS"
	DDOriginDetectionUnified               = "DD_ORIGIN_DETECTION_UNIFIED"
	DDPodAnnotationsAsTags                 = "DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS"
	DDPodLabelsAsTags                      = "DD_KUBERNETES_POD_LABELS_AS_TAGS"
	DDSecretBackendCommand                 = "DD_SECRET_BACKEND_COMMAND"
	DDSecretBackendArguments               = "DD_SECRET_BACKEND_ARGUMENTS"
	DDSecretBackendTimeout                 = "DD_SECRET_BACKEND_TIMEOUT"
	DDSecretBackendType                    = "DD_SECRET_BACKEND_TYPE"
	DDSecretBackendConfig                  = "DD_SECRET_BACKEND_CONFIG"
	DDSecretRefreshInterval                = "DD_SECRET_REFRESH_INTERVAL"
	DDTags                                 = "DD_TAGS"
	DockerHost                             = "DOCKER_HOST"
	DDKubernetesResourcesLabelsAsTags      = "DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS"
	DDKubernetesResourcesAnnotationsAsTags = "DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS"
	DDCSIEnabled                           = "DD_CSI_ENABLED"
	DDVSockAddr                            = "DD_VSOCK_ADDR"
	DDProviderKind                         = "DD_PROVIDER_KIND"
	DDRemoteAgentRegistryEnabled           = "DD_REMOTE_AGENT_REGISTRY_ENABLED"
)

This file tracks environment variables used in global

Variables

View Source
var ClusterAgentProviderSpec = providercaps.ProviderCapabilityMap{
	kubernetes.GKEAutopilotProvider: {
		EnvVars: []providercaps.EnvVarSet{
			{EnvVar: corev1.EnvVar{Name: ddCloudProviderMetadata, Value: `["gcp"]`}},
		},
	},
}

ClusterAgentProviderSpec is the provider-keyed capabilities map for the Cluster Agent pod template. Helm's _components-common-env.yaml emits DD_CLOUD_PROVIDER_METADATA on all components that include that template; DCA includes it but does NOT include the provider-env helper that emits DD_PROVIDER_KIND.

View Source
var ClusterChecksRunnerProviderSpec = providercaps.ProviderCapabilityMap{
	kubernetes.GKEAutopilotProvider: {
		EnvVars: []providercaps.EnvVarSet{
			{EnvVar: corev1.EnvVar{Name: ddCloudProviderMetadata, Value: `["gcp"]`}},
			{EnvVar: corev1.EnvVar{Name: DDProviderKind, Value: kubernetes.GKEAutopilotProvider}},
		},
	},
}

ClusterChecksRunnerProviderSpec is the provider-keyed capabilities map for the Cluster Checks Runner pod template. CCR includes both _components-common-env.yaml (DD_CLOUD_PROVIDER_METADATA) and the provider-env helper (DD_PROVIDER_KIND).

View Source
var NodeAgentProviderSpec = providercaps.ProviderCapabilityMap{
	kubernetes.EKSEC2UseHostnameFromFileProvider: {

		EnvVars: []providercaps.EnvVarSet{
			{
				EnvVar: corev1.EnvVar{
					Name:  "DD_HOSTNAME_FILE",
					Value: cloudInitInstanceIDPath,
				},
				InitContainers: []apicommon.AgentContainerName{
					apicommon.InitConfigContainerName,
				},
			},
		},

		Volumes: []providercaps.VolumeAndMount{
			{
				Volume: corev1.Volume{
					Name: cloudInitInstanceIDVolumeName,
					VolumeSource: corev1.VolumeSource{
						HostPath: &corev1.HostPathVolumeSource{
							Path: cloudInitInstanceIDPath,
							Type: ptr.To(corev1.HostPathFile),
						},
					},
				},
				Mount: corev1.VolumeMount{
					Name:      cloudInitInstanceIDVolumeName,
					MountPath: cloudInitInstanceIDPath,
					ReadOnly:  true,
				},
				Containers: []apicommon.AgentContainerName{
					apicommon.CoreAgentContainerName,
					apicommon.TraceAgentContainerName,
					apicommon.ProcessAgentContainerName,
					apicommon.SystemProbeContainerName,
					apicommon.SecurityAgentContainerName,
					apicommon.AgentDataPlaneContainerName,
					apicommon.AgentCheckRunnerContainerName,
					apicommon.OtelAgent,
					apicommon.UnprivilegedSingleAgentContainerName,
				},
			},
		},
	},

	kubernetes.GKEAutopilotProvider: {
		EnvVars: []providercaps.EnvVarSet{
			{EnvVar: corev1.EnvVar{Name: ddKubeletUseAPIServer, Value: "true"}},
			{EnvVar: corev1.EnvVar{Name: ddCloudProviderMetadata, Value: `["gcp"]`}},
			{EnvVar: corev1.EnvVar{Name: DDProviderKind, Value: kubernetes.GKEAutopilotProvider}},
		},

		RemoveVolumes: []string{
			common.AuthVolumeName,
			common.CriSocketVolumeName,
		},

		RemoveMounts: []providercaps.ContainerMountRef{
			{VolumeName: common.ProcdirVolumeName, Containers: []apicommon.AgentContainerName{apicommon.TraceAgentContainerName}},
			{VolumeName: common.CgroupsVolumeName, Containers: []apicommon.AgentContainerName{apicommon.TraceAgentContainerName}},
		},

		RemoveEnvVars: []string{common.DDAuthTokenFilePath},
	},
}

NodeAgentProviderSpec is the provider-keyed capabilities map for the node agent pod template. The "" baseline applies to all providers; provider-keyed entries are applied on top (removals first, then additions).

Mirrors the Helm chart's _provider-specific_ pod-template additions (see charts/datadog/templates/_containers-common-env.yaml and _container-cloudinit-volumemounts.yaml).

Functions

func AddAPMTelemetryDependencies added in v1.16.0

func AddAPMTelemetryDependencies(_ logr.Logger, dda metav1.Object, manager feature.ResourceManagers) error

func AddCredentialDependencies added in v1.16.0

func AddCredentialDependencies(logger logr.Logger, ddaMeta metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec, manager feature.ResourceManagers) error

func AddDCATokenDependencies added in v1.16.0

func AddDCATokenDependencies(logger logr.Logger, ddaMeta metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec, ddaStatus *v2alpha1.DatadogAgentStatus, manager feature.ResourceManagers) error

func AddInstallInfoDependencies added in v1.18.0

func AddInstallInfoDependencies(dda metav1.Object, manager feature.ResourceManagers) error

func ApplyGlobalClusterAgentSpec added in v1.29.0

func ApplyGlobalClusterAgentSpec(mgr feature.PodTemplateManagers, provider string)

ApplyGlobalClusterAgentSpec applies provider-conditional global mutations to the Cluster Agent pod template.

func ApplyGlobalClusterChecksRunnerSpec added in v1.29.0

func ApplyGlobalClusterChecksRunnerSpec(mgr feature.PodTemplateManagers, provider string)

ApplyGlobalClusterChecksRunnerSpec applies provider-conditional global mutations to the Cluster Checks Runner pod template.

func ApplyGlobalComponentDependencies

func ApplyGlobalComponentDependencies(logger logr.Logger, ddaMeta metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec, ddaStatus *v2alpha1.DatadogAgentStatus, resourceManagers feature.ResourceManagers, componentName v2alpha1.ComponentName, rc feature.RequiredComponent, fromDDAI bool) []error

ApplyGlobalComponentDependencies applies the global dependencies for a component.

func ApplyGlobalDependencies

func ApplyGlobalDependencies(logger logr.Logger, ddaMeta metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec, resourceManagers feature.ResourceManagers, fromDDAI bool) []error

ApplyGlobalDependencies applies the global dependencies for a DatadogAgent instance. fromDDAI is true if the dependencies are being applied to a DatadogAgentInternal instance.

func ApplyGlobalNodeAgentSpec added in v1.29.0

func ApplyGlobalNodeAgentSpec(mgr feature.PodTemplateManagers, provider string)

ApplyGlobalNodeAgentSpec applies the provider-conditional global mutations to the node agent pod template. It must run AFTER ApplyGlobalSettingsNodeAgent so that removals (e.g. the CRI socket added from global.criSocketPath) see the volumes they target.

func ApplyGlobalSettingsClusterAgent

func ApplyGlobalSettingsClusterAgent(logger logr.Logger, manager feature.PodTemplateManagers, ddaMeta metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec,
	resourcesManager feature.ResourceManagers, requiredComponents feature.RequiredComponents)

ApplyGlobalSettingsClusterAgent applies the global settings for the ClusterAgent component.

func ApplyGlobalSettingsClusterChecksRunner

func ApplyGlobalSettingsClusterChecksRunner(logger logr.Logger, manager feature.PodTemplateManagers, ddaMeta metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec,
	resourcesManager feature.ResourceManagers, requiredComponents feature.RequiredComponents)

ApplyGlobalSettingsClusterChecksRunner applies the global settings for the ClusterChecksRunner component.

func ApplyGlobalSettingsNodeAgent

func ApplyGlobalSettingsNodeAgent(logger logr.Logger, manager feature.PodTemplateManagers, ddaMeta metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec,
	resourcesManager feature.ResourceManagers, singleContainerStrategyEnabled bool, requiredComponents feature.RequiredComponents)

ApplyGlobalSettingsNodeAgent applies the global settings for the NodeAgent component.

func ApplyGlobalSettingsOtelAgentGateway added in v1.23.0

func ApplyGlobalSettingsOtelAgentGateway(
	logger logr.Logger,
	manager feature.PodTemplateManagers,
	ddaMeta metav1.Object,
	ddaSpec *v2alpha1.DatadogAgentSpec,
	resourcesManager feature.ResourceManagers,
	requiredComponents feature.RequiredComponents,
)

ApplyGlobalSettingsOtelAgentGateway applies global settings to the OtelAgentGateway deployment

func GetDCATokenChecksumAnnotationKey added in v1.17.0

func GetDCATokenChecksumAnnotationKey() string

func IsValidSecretConfig added in v1.17.0

func IsValidSecretConfig(secretConfig *v2alpha1.SecretConfig) bool

func SetGlobalFromDDA added in v1.16.0

func SetGlobalFromDDA(dda *v2alpha1.DatadogAgent, ddaiGlobal *v2alpha1.GlobalConfig)

func ValidateFIPSVersions added in v1.26.0

func ValidateFIPSVersions(manager feature.PodTemplateManagers) []error

ValidateFIPSVersions checks all containers in the pod template for FIPS version compatibility. This must be called after all image overrides have been applied, so it sees the final image tags.

Types

This section is empty.

Jump to

Keyboard shortcuts

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