diff --git a/deployments/generic/kubearmor.yaml b/deployments/generic/kubearmor.yaml index 8d07e5cdf9..581d253b37 100644 --- a/deployments/generic/kubearmor.yaml +++ b/deployments/generic/kubearmor.yaml @@ -2721,7 +2721,7 @@ spec: name: docker-storage-path readOnly: true dnsPolicy: ClusterFirstWithHostNet - hostNetwork: true + hostNetwork: false hostPID: true initContainers: - image: kubearmor/kubearmor-init:stable diff --git a/pkg/KubeArmorOperator/internal/controller/resources.go b/pkg/KubeArmorOperator/internal/controller/resources.go index 4489f2628d..b13f65443f 100644 --- a/pkg/KubeArmorOperator/internal/controller/resources.go +++ b/pkg/KubeArmorOperator/internal/controller/resources.go @@ -77,7 +77,10 @@ func generateDaemonset(name, enforcer, runtime, socket, runtimeStorage, btfPrese daemonset.Spec.Template.Spec.InitContainers[0].Image = common.KubeArmorInitImage daemonset.Spec.Template.Spec.InitContainers[0].ImagePullPolicy = corev1.PullPolicy(common.KubeArmorInitImagePullPolicy) + daemonset.Spec.Template.Spec.HostNetwork = false + daemonset = addOwnership(daemonset).(*appsv1.DaemonSet) + fmt.Printf("generated daemonset: %v", daemonset) return daemonset }