From 7840ecb5daf87327ae6f28144fc1930cfa8effc6 Mon Sep 17 00:00:00 2001 From: Alessio Greggi Date: Tue, 2 May 2023 10:31:29 +0200 Subject: [PATCH] fix: move host-scanner to kubescape namespace Signed-off-by: Alessio Greggi --- core/cautils/getter/testdata/policy.json | 4 ++-- core/pkg/hostsensorutils/hostsensor.yaml | 4 ++-- core/pkg/hostsensorutils/hostsensordeploy_test.go | 2 +- .../reporter/v2/testdata/mock_opasessionobj.json | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/cautils/getter/testdata/policy.json b/core/cautils/getter/testdata/policy.json index d797991a..672203d8 100644 --- a/core/cautils/getter/testdata/policy.json +++ b/core/cautils/getter/testdata/policy.json @@ -25789,7 +25789,7 @@ }, { "guid": "", - "name": "exclude-kubescape-host-scanner-resources", + "name": "exclude-host-scanner-resources", "attributes": { "systemException": true }, @@ -25804,7 +25804,7 @@ "attributes": { "kind": "DaemonSet", "name": "host-scanner", - "namespace": "kubescape-host-scanner" + "namespace": "kubescape" } } ], diff --git a/core/pkg/hostsensorutils/hostsensor.yaml b/core/pkg/hostsensorutils/hostsensor.yaml index 5ee52b6f..89f892e3 100644 --- a/core/pkg/hostsensorutils/hostsensor.yaml +++ b/core/pkg/hostsensorutils/hostsensor.yaml @@ -6,13 +6,13 @@ metadata: k8s-app: kubescape-host-scanner kubernetes.io/metadata.name: kubescape-host-scanner tier: kubescape-host-scanner-control-plane - name: kubescape-host-scanner + name: kubescape --- apiVersion: apps/v1 kind: DaemonSet metadata: name: host-scanner - namespace: kubescape-host-scanner + namespace: kubescape labels: app: host-scanner k8s-app: kubescape-host-scanner diff --git a/core/pkg/hostsensorutils/hostsensordeploy_test.go b/core/pkg/hostsensorutils/hostsensordeploy_test.go index a26fb27a..58c9d94e 100644 --- a/core/pkg/hostsensorutils/hostsensordeploy_test.go +++ b/core/pkg/hostsensorutils/hostsensordeploy_test.go @@ -34,7 +34,7 @@ func TestHostSensorHandler(t *testing.T) { }) t.Run("should return namespace", func(t *testing.T) { - require.Equal(t, "kubescape-host-scanner", h.GetNamespace()) + require.Equal(t, "kubescape", h.GetNamespace()) }) t.Run("should collect resources from pods - happy path", func(t *testing.T) { diff --git a/core/pkg/resultshandling/reporter/v2/testdata/mock_opasessionobj.json b/core/pkg/resultshandling/reporter/v2/testdata/mock_opasessionobj.json index 697f91c5..8b419749 100644 --- a/core/pkg/resultshandling/reporter/v2/testdata/mock_opasessionobj.json +++ b/core/pkg/resultshandling/reporter/v2/testdata/mock_opasessionobj.json @@ -62743,7 +62743,7 @@ }, { "guid": "", - "name": "exclude-kubescape-host-scanner-resources", + "name": "exclude-host-scanner-resources", "attributes": { "systemException": true }, @@ -62758,7 +62758,7 @@ "attributes": { "kind": "DaemonSet", "name": "host-scanner", - "namespace": "kubescape-host-scanner" + "namespace": "kubescape" } } ],