From d10befa47ed3a96b3b330112bbfeca738e4769db Mon Sep 17 00:00:00 2001 From: Bastien Grasnick Date: Fri, 1 Sep 2023 11:41:15 +0200 Subject: [PATCH] Feat: remove /sys/kernel/debug mount Since /sys is already mounted, we need not mount /sys/kernel/* Signed-off-by: Bastien Grasnick --- pkg/components/exporter/exporter.go | 2 -- pkg/components/exporter/exporter_test.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/pkg/components/exporter/exporter.go b/pkg/components/exporter/exporter.go index 6eee64fe..b64a1671 100644 --- a/pkg/components/exporter/exporter.go +++ b/pkg/components/exporter/exporter.go @@ -165,7 +165,6 @@ func NewDaemonSet(detail components.Detail, k *v1alpha1.Kepler) *appsv1.DaemonSe {Name: "lib-modules", MountPath: "/lib/modules", ReadOnly: true}, {Name: "tracing", MountPath: "/sys", ReadOnly: true}, {Name: "kernel-src", MountPath: "/usr/src/kernels", ReadOnly: true}, - {Name: "kernel-debug", MountPath: "/sys/kernel/debug"}, {Name: "proc", MountPath: "/proc"}, {Name: "cfm", MountPath: "/etc/kepler/kepler.config"}, }, // VolumeMounts @@ -175,7 +174,6 @@ func NewDaemonSet(detail components.Detail, k *v1alpha1.Kepler) *appsv1.DaemonSe k8s.VolumeFromHost("tracing", "/sys"), k8s.VolumeFromHost("proc", "/proc"), k8s.VolumeFromHost("kernel-src", "/usr/src/kernels"), - k8s.VolumeFromHost("kernel-debug", "/sys/kernel/debug"), k8s.VolumeFromConfigMap("cfm", ConfigmapName), }, // Volumes }, // PodSpec diff --git a/pkg/components/exporter/exporter_test.go b/pkg/components/exporter/exporter_test.go index 14b3ec57..87569525 100644 --- a/pkg/components/exporter/exporter_test.go +++ b/pkg/components/exporter/exporter_test.go @@ -120,7 +120,6 @@ func TestVolumeMounts(t *testing.T) { {Name: "lib-modules", MountPath: "/lib/modules", ReadOnly: true}, {Name: "tracing", MountPath: "/sys", ReadOnly: true}, {Name: "kernel-src", MountPath: "/usr/src/kernels", ReadOnly: true}, - {Name: "kernel-debug", MountPath: "/sys/kernel/debug"}, {Name: "proc", MountPath: "/proc"}, {Name: "cfm", MountPath: "/etc/kepler/kepler.config"}, }, @@ -155,7 +154,6 @@ func TestVolumes(t *testing.T) { k8s.VolumeFromHost("tracing", "/sys"), k8s.VolumeFromHost("proc", "/proc"), k8s.VolumeFromHost("kernel-src", "/usr/src/kernels"), - k8s.VolumeFromHost("kernel-debug", "/sys/kernel/debug"), k8s.VolumeFromConfigMap("cfm", ConfigmapName), }, scenario: "default case",