Skip to content

Commit

Permalink
[controllers/datadogagent/utils] Fix process collection nil check (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidor authored and khewonc committed Apr 20, 2022
1 parent d332550 commit 65a4345
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/datadogagent/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func shouldMountPasswdVolume(dda *datadoghqv1alpha1.DatadogAgent) bool {
return false
}

return *dda.Spec.Agent.Process.ProcessCollectionEnabled
return apiutils.BoolValue(dda.Spec.Agent.Process.ProcessCollectionEnabled)
}

// processCollectionEnabled
Expand Down Expand Up @@ -1648,7 +1648,7 @@ func getVolumeMountsForProcessAgent(dda *datadoghqv1alpha1.DatadogAgent) []corev
},
}

if *dda.Spec.Agent.Process.ProcessCollectionEnabled {
if apiutils.BoolValue(dda.Spec.Agent.Process.ProcessCollectionEnabled) {
volumeMounts = append(volumeMounts,
corev1.VolumeMount{
Name: datadoghqv1alpha1.PasswdVolumeName,
Expand Down

0 comments on commit 65a4345

Please sign in to comment.