Skip to content

Commit

Permalink
Enable by default container-image collection (#983)
Browse files Browse the repository at this point in the history
We want to enabled container-image collection by default. it will
be the case from agent 7.50.0. But in Operator 1.3.0, the Agent is
defaulted to 7.49.0 since 7.50.0 is not yet released.

This commit set the envvar DD_CONTAINER_IMAGE_ENABLED=true by default
in the NodeAgent's "agent" container.
  • Loading branch information
clamoriniere authored Nov 17, 2023
1 parent a5a927a commit eab9599
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apis/datadoghq/common/envvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -136,4 +137,7 @@ const (
KubernetesEnvVar = "KUBERNETES"

ClusterChecksConfigProvider = "clusterchecks"

EnvVarTrueValue = "true"
EnvVarFalseValue = "false"
)
8 changes: 7 additions & 1 deletion controllers/datadogagent/component/agent/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}

Expand Down

0 comments on commit eab9599

Please sign in to comment.