diff --git a/controllers/ebpf/agent_controller.go b/controllers/ebpf/agent_controller.go index 072157ff4..a18656054 100644 --- a/controllers/ebpf/agent_controller.go +++ b/controllers/ebpf/agent_controller.go @@ -206,9 +206,9 @@ func (c *AgentController) desired(ctx context.Context, coll *flowslatest.FlowCol volumeMounts = append(volumeMounts, volumeMount) } - if helper.IsFeatureEnabled(&coll.Spec.Agent.EBPF, flowslatest.PacketDrop) || helper.IsFeatureEnabled(&coll.Spec.Agent.EBPF, flowslatest.DNSTracking) { + if helper.IsFeatureEnabled(&coll.Spec.Agent.EBPF, flowslatest.PacketDrop) { if !coll.Spec.Agent.EBPF.Privileged { - rlog.Error(fmt.Errorf("invalid configuration"), "To use PacketsDrop and/or DNSTracking feature(s) privileged mode needs to be enabled") + rlog.Error(fmt.Errorf("invalid configuration"), "To use PacketsDrop feature privileged mode needs to be enabled") } else { volume := corev1.Volume{ Name: bpfTraceMountName, diff --git a/pkg/helper/flowcollector.go b/pkg/helper/flowcollector.go index a501d07fe..49efa61ea 100644 --- a/pkg/helper/flowcollector.go +++ b/pkg/helper/flowcollector.go @@ -268,10 +268,7 @@ func IsPktDropEnabled(spec *flowslatest.FlowCollectorEBPF) bool { } func IsDNSTrackingEnabled(spec *flowslatest.FlowCollectorEBPF) bool { - if IsPrivileged(spec) && IsFeatureEnabled(spec, flowslatest.DNSTracking) { - return true - } - return false + return IsFeatureEnabled(spec, flowslatest.DNSTracking) } func IsFlowRTTEnabled(spec *flowslatest.FlowCollectorEBPF) bool {