Skip to content

Commit

Permalink
[CSPM] Disabling host benchmarks should be propagated to the agent
Browse files Browse the repository at this point in the history
  • Loading branch information
jinroh committed Jul 8, 2024
1 parent 4c1f839 commit 6f00713
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions controllers/datadogagent/feature/cspm/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,11 @@ func (f *cspmFeature) ManageNodeAgent(managers feature.PodTemplateManagers, prov
managers.EnvVar().AddEnvVarToContainer(apicommonv1.SecurityAgentContainerName, intervalEnvVar)
}

if f.hostBenchmarksEnabled {
hostBenchmarksEnabledEnvVar := &corev1.EnvVar{
Name: apicommon.DDComplianceHostBenchmarksEnabled,
Value: apiutils.BoolToString(&f.hostBenchmarksEnabled),
}
managers.EnvVar().AddEnvVarToContainer(apicommonv1.SecurityAgentContainerName, hostBenchmarksEnabledEnvVar)
hostBenchmarksEnabledEnvVar := &corev1.EnvVar{
Name: apicommon.DDComplianceHostBenchmarksEnabled,
Value: apiutils.BoolToString(&f.hostBenchmarksEnabled),
}
managers.EnvVar().AddEnvVarToContainer(apicommonv1.SecurityAgentContainerName, hostBenchmarksEnabledEnvVar)

return nil
}
Expand Down

0 comments on commit 6f00713

Please sign in to comment.