Documentation
¶
Index ¶
- Constants
- func AgentSupportsADPDogstatsdDelegation(ddaSpec *v2alpha1.DatadogAgentSpec) bool
- func AgentSupportsDefaultDataPlane(ddaSpec *v2alpha1.DatadogAgentSpec) bool
- func ClusterAgentVersion(ddaSpec *v2alpha1.DatadogAgentSpec) string
- func EnableConfigSyncForDirectSend(managers feature.PodTemplateManagers, ...)
- func GetFeatureConfigAnnotation(dda metav1.Object, annotation string) (string, bool)
- func HasFeatureDisableAnnotation(dda metav1.Object, annotation string) bool
- func HasFeatureEnableAnnotation(dda metav1.Object, annotation string) bool
- func IsDataPlaneDogstatsdEnabled(ddaSpec *v2alpha1.DatadogAgentSpec) bool
- func IsDataPlaneEnabled(dda metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec, defaultEnabled bool) bool
- func IsKubernetesActionsPAREnabled(ddaSpec *v2alpha1.DatadogAgentSpec) bool
- func IsKubernetesActionsPARRequested(ddaSpec *v2alpha1.DatadogAgentSpec) bool
- func IsKubernetesActionsRCEnabled(ddaSpec *v2alpha1.DatadogAgentSpec) bool
- func ShouldCreateLocalAgentService(ddaSpec *v2alpha1.DatadogAgentSpec, platformInfo kubernetes.PlatformInfo) bool
- func ShouldRunProcessChecksInCoreAgent(dda metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec) bool
Constants ¶
const ( ProcessConfigRunInCoreAgentMinVersion = "7.60.0-0" // ADPDogstatsdDelegationMinVersion is the minimum Agent version that natively disables Core Agent // DogStatsD when data_plane.enabled and data_plane.dogstatsd.enabled are both true. Below this // version the Operator must set DD_USE_DOGSTATSD=false explicitly to avoid a bind conflict. ADPDogstatsdDelegationMinVersion = "7.75.0-0" // DefaultDataPlaneMinAgentVersion is the minimum Agent version that receives the Operator-level Data Plane default. // Explicit Data Plane configuration remains available for older versions. DefaultDataPlaneMinAgentVersion = "7.84.0-0" EnableADPAnnotation = "agent.datadoghq.com/adp-enabled" EnableFineGrainedKubeletAuthz = "agent.datadoghq.com/fine-grained-kubelet-authorization-enabled" EnableKSMApiServerCacheAnnotation = "agent.datadoghq.com/ksm-use-apiserver-cache" EnableInstrumentationCRDAnnotation = "agent.datadoghq.com/instrumentation-crd-enabled" EnableFlightRecorderAnnotation = "agent.datadoghq.com/flightrecorder-enabled" EnableNetworkCRDsAnnotation = "agent.datadoghq.com/network-crds-enabled" EnablePrivateActionRunnerAnnotation = "agent.datadoghq.com/private-action-runner-enabled" EnablePrivateActionRunnerSplitAnnotation = "agent.datadoghq.com/private-action-runner-split-enabled" PrivateActionRunnerConfigDataAnnotation = "agent.datadoghq.com/private-action-runner-configdata" EnablePrivateActionRunnerSystemdAnnotation = "agent.datadoghq.com/private-action-runner-systemd-enabled" PrivateActionRunnerSystemdJournalStorageAnnotation = "agent.datadoghq.com/private-action-runner-systemd-journal-storage" EnablePrivateActionRunnerSystemdJournalVacuumAnnotation = "agent.datadoghq.com/private-action-runner-systemd-journal-vacuum-enabled" EnablePrivateActionRunnerPacketCaptureAnnotation = "agent.datadoghq.com/private-action-runner-packet-capture-enabled" EnableCNMDirectSendAnnotation = "agent.datadoghq.com/cnm-direct-send-enabled" // DefaultAgentIpcPort and DefaultAgentIpcConfigRefreshInterval configure config sync, which // serves resolved config (notably a secret-backed api_key) from the core agent to sub-processes. DefaultAgentIpcPort = "5009" DefaultAgentIpcConfigRefreshInterval = "60" EnableClusterAgentPrivateActionRunnerAnnotation = "cluster-agent.datadoghq.com/private-action-runner-enabled" ClusterAgentPrivateActionRunnerConfigDataAnnotation = "cluster-agent.datadoghq.com/private-action-runner-configdata" ClusterAgentPrivateActionRunnerK8sRemediationEnabled = "cluster-agent.datadoghq.com/private-action-runner-k8s-remediation-enabled" EnableCheckRunnerAnnotation = "agent.datadoghq.com/check-runner-enabled" )
const ( // Deprecated: use spec.features.hostProfiler.enabled. EnableHostProfilerAnnotation = "agent.datadoghq.com/host-profiler-enabled" // EnableHostProfilerSeccompAnnotation controls whether the host-profiler applies its localhost // seccomp profile (and the init container that installs it on the node). Defaults to enabled; // set to "false" to disable both the seccomp profile and its setup init container. // // Deprecated: use spec.features.hostProfiler.seccomp.enabled. EnableHostProfilerSeccompAnnotation = "agent.datadoghq.com/host-profiler-seccomp-enabled" // Deprecated: use spec.features.hostProfiler.seccomp.loggingEnabled. EnableHostProfilerLoggingSeccompAnnotation = "agent.datadoghq.com/host-profiler-logging-seccomp-enabled" // HostProfilerSELinuxTypeAnnotation overrides the SELinux type applied to the host-profiler container. // // Deprecated: use spec.features.hostProfiler.seLinuxType. HostProfilerSELinuxTypeAnnotation = "agent.datadoghq.com/host-profiler-selinux-type" // Deprecated: use spec.features.hostProfiler.runAsRoot (inverted: "true" here means runAsRoot: false). EnableHostProfilerNonRootAnnotation = "agent.datadoghq.com/host-profiler-non-root-enabled" )
Host Profiler annotations are deprecated in favor of spec.features.hostProfiler and will be removed in a future release. Until then, spec.features.hostProfiler takes precedence and the annotations are still read as a fallback for settings not defined in the spec.
const KubernetesActionsMinVersion = "7.84.0-0"
KubernetesActionsMinVersion is the minimum Cluster Agent version that supports the Kubernetes Actions feature, through both Remote Configuration and the Private Action Runner.
Variables ¶
This section is empty.
Functions ¶
func AgentSupportsADPDogstatsdDelegation ¶ added in v1.27.0
func AgentSupportsADPDogstatsdDelegation(ddaSpec *v2alpha1.DatadogAgentSpec) bool
AgentSupportsADPDogstatsdDelegation returns true if the agent version is >= 7.75.0, meaning it natively disables Core DogStatsD when data_plane.enabled + data_plane.dogstatsd.enabled are true. For older agents the Operator must set DD_USE_DOGSTATSD=false explicitly.
func AgentSupportsDefaultDataPlane ¶ added in v1.31.0
func AgentSupportsDefaultDataPlane(ddaSpec *v2alpha1.DatadogAgentSpec) bool
AgentSupportsDefaultDataPlane returns whether the selected Agent image supports the Operator-level Data Plane default. Unlike other version checks in this file, an unparseable version defaults to false: this gates an implicit, Operator-level default rather than an explicit user opt-in, so an unknown Agent version must not silently enable the Data Plane.
func ClusterAgentVersion ¶ added in v1.32.0
func ClusterAgentVersion(ddaSpec *v2alpha1.DatadogAgentSpec) string
ClusterAgentVersion returns the Cluster Agent version from the image override, or the latest supported version when the image is not overridden.
func EnableConfigSyncForDirectSend ¶ added in v1.30.0
func EnableConfigSyncForDirectSend(managers feature.PodTemplateManagers, containers []apicommon.AgentContainerName)
EnableConfigSyncForDirectSend sets the agent_ipc env vars that config sync requires, on the given containers. system-probe wires the no-op secrets component, so with direct send it cannot resolve an ENC[...] api_key itself; config sync is what supplies the resolved value from the core agent. Both a refresh interval and an IPC transport are needed, since agent_ipc.port defaults to 0 and is gated independently of agent_ipc.config_refresh_interval.
Values match the otelcollector and hostprofiler features, which set the same core agent env vars for the same reason; a mismatch there would leave the port up to feature ordering. User-provided values win.
func GetFeatureConfigAnnotation ¶ added in v1.25.0
func HasFeatureDisableAnnotation ¶ added in v1.30.0
HasFeatureDisableAnnotation returns true if the annotation is explicitly set to "false". It is used by features that are enabled by default and can be opted out of.
func HasFeatureEnableAnnotation ¶ added in v1.25.0
func IsDataPlaneDogstatsdEnabled ¶ added in v1.25.0
func IsDataPlaneDogstatsdEnabled(ddaSpec *v2alpha1.DatadogAgentSpec) bool
IsDataPlaneDogstatsdEnabled returns true if the Data Plane should handle DogStatsD. Defaults to true: when data_plane.enabled=true, ADP handles DogStatsD unless explicitly disabled.
func IsDataPlaneEnabled ¶ added in v1.25.0
func IsDataPlaneEnabled(dda metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec, defaultEnabled bool) bool
IsDataPlaneEnabled returns true if the Data Plane is enabled. CRD configuration takes precedence over the legacy annotation, which takes precedence over defaultEnabled.
func IsKubernetesActionsPAREnabled ¶ added in v1.32.0
func IsKubernetesActionsPAREnabled(ddaSpec *v2alpha1.DatadogAgentSpec) bool
IsKubernetesActionsPAREnabled returns whether Kubernetes Actions should be delivered to the Cluster Agent through the Cluster Agent Private Action Runner: it is requested and the Cluster Agent supports Kubernetes Actions.
func IsKubernetesActionsPARRequested ¶ added in v1.32.0
func IsKubernetesActionsPARRequested(ddaSpec *v2alpha1.DatadogAgentSpec) bool
IsKubernetesActionsPARRequested returns whether the DatadogAgent asks for Kubernetes Actions to be delivered through the Cluster Agent Private Action Runner, regardless of the Cluster Agent version. Defaults to true when unset.
func IsKubernetesActionsRCEnabled ¶ added in v1.32.0
func IsKubernetesActionsRCEnabled(ddaSpec *v2alpha1.DatadogAgentSpec) bool
IsKubernetesActionsRCEnabled returns whether Kubernetes Actions should be delivered to the Cluster Agent through Remote Configuration. Defaults to true when unset.
func ShouldCreateLocalAgentService ¶ added in v1.29.0
func ShouldCreateLocalAgentService(ddaSpec *v2alpha1.DatadogAgentSpec, platformInfo kubernetes.PlatformInfo) bool
func ShouldRunProcessChecksInCoreAgent ¶ added in v1.21.0
func ShouldRunProcessChecksInCoreAgent(dda metav1.Object, ddaSpec *v2alpha1.DatadogAgentSpec) bool
ShouldRunProcessChecksInCoreAgent determines whether process checks should run in the core agent based on the provider and agent version. Windows agents always run process checks in the standalone process-agent. Agents >= 7.60.0 support running process checks in the core agent on Linux. As of Agent 7.78, process checks always run in the core agent on Linux and the DD_PROCESS_CONFIG_RUN_IN_CORE_AGENT_ENABLED envvar is no longer recognized.
Types ¶
This section is empty.