diff --git a/apis/datadoghq/common/envvar.go b/apis/datadoghq/common/envvar.go index 3b7603276..1d4f86d38 100644 --- a/apis/datadoghq/common/envvar.go +++ b/apis/datadoghq/common/envvar.go @@ -105,6 +105,7 @@ const ( DDRuntimeSecurityConfigNetworkEnabled = "DD_RUNTIME_SECURITY_CONFIG_NETWORK_ENABLED" DDRuntimeSecurityConfigActivityDumpEnabled = "DD_RUNTIME_SECURITY_CONFIG_ACTIVITY_DUMP_ENABLED" DDRuntimeSecurityConfigRemoteConfigurationEnabled = "DD_RUNTIME_SECURITY_CONFIG_REMOTE_CONFIGURATION_ENABLED" + DDContainerImageEnabled = "DD_CONTAINER_IMAGE_ENABLED" DDSBOMEnabled = "DD_SBOM_ENABLED" DDSBOMContainerImageEnabled = "DD_SBOM_CONTAINER_IMAGE_ENABLED" DDSBOMContainerImageAnalyzers = "DD_SBOM_CONTAINER_IMAGE_ANALYZERS" @@ -136,4 +137,7 @@ const ( KubernetesEnvVar = "KUBERNETES" ClusterChecksConfigProvider = "clusterchecks" + + EnvVarTrueValue = "true" + EnvVarFalseValue = "false" ) diff --git a/controllers/datadogagent/component/agent/default.go b/controllers/datadogagent/component/agent/default.go index 171cc8081..827c1bd85 100644 --- a/controllers/datadogagent/component/agent/default.go +++ b/controllers/datadogagent/component/agent/default.go @@ -268,7 +268,13 @@ func envVarsForCoreAgent(dda metav1.Object) []corev1.EnvVar { }, { Name: apicommon.DDLeaderElection, - Value: "true", + Value: apicommon.EnvVarTrueValue, + }, + { + // we want to default it in 7.49.0 + // but in 7.50.0 it will be already defaulted in the agent process. + Name: apicommon.DDContainerImageEnabled, + Value: apicommon.EnvVarTrueValue, }, }