diff --git a/deployments/get/objects.go b/deployments/get/objects.go index f8d2312a52..6e9a28550c 100644 --- a/deployments/get/objects.go +++ b/deployments/get/objects.go @@ -264,6 +264,7 @@ func GenerateDaemonSet(env, namespace string) *appsv1.DaemonSet { var terminationGracePeriodSeconds = int64(60) var args = []string{ "-gRPC=" + strconv.Itoa(int(port)), + "-procfsMount=/host/procfs", } var containerVolumeMounts = []corev1.VolumeMount{ @@ -381,7 +382,6 @@ func GenerateDaemonSet(env, namespace string) *appsv1.DaemonSet { Operator: "Exists", }, }, - HostPID: true, HostNetwork: true, RestartPolicy: "Always", DNSPolicy: "ClusterFirstWithHostNet", diff --git a/pkg/KubeArmorOperator/common/defaults.go b/pkg/KubeArmorOperator/common/defaults.go index 0d315afa9f..f84e360454 100644 --- a/pkg/KubeArmorOperator/common/defaults.go +++ b/pkg/KubeArmorOperator/common/defaults.go @@ -237,6 +237,15 @@ var CommonVolumes = []corev1.Volume{ }, }, }, + { + Name: "proc-fs-mount", + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: "/proc", + Type: &HostPathDirectory, + }, + }, + }, } var CommonVolumesMount = []corev1.VolumeMount{ @@ -244,6 +253,11 @@ var CommonVolumesMount = []corev1.VolumeMount{ Name: "sys-kernel-debug-path", MountPath: "/sys/kernel/debug", }, + { + Name: "proc-fs-mount", + MountPath: "/host/procfs", + ReadOnly: true, + }, } var KubeArmorCaVolume = []corev1.Volume{