Skip to content

Commit

Permalink
Merge pull request #132 from kubescape/nonn
Browse files Browse the repository at this point in the history
clean networkneighborses as they are deprecated
  • Loading branch information
matthyx authored Aug 19, 2024
2 parents 6848f00 + db7be0b commit 7cf5181
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cleanup/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var resourceKindToHandler = map[string]TypeCleanupHandlerFunc{
"applicationactivities": deleteByTemplateHashOrWlid,
"applicationprofiles": deleteByTemplateHashOrWlid,
"applicationprofilesummaries": deleteDeprecated,
"networkneighborses": deleteByWlid,
"networkneighborses": deleteDeprecated,
"networkneighborhoods": deleteByTemplateHashOrWlid,
"openvulnerabilityexchangecontainers": deleteByImageId,
"sbomspdxv2p3filtereds": deleteDeprecated,
Expand Down
16 changes: 16 additions & 0 deletions pkg/cleanup/cleanup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,26 @@ func TestCleanupTask(t *testing.T) {
"/data/spdx.softwarecomposition.kubescape.io/applicationprofilesummaries/kubescape/kubescape-statefulset-kollector-c1be-77d8.m",
"/data/spdx.softwarecomposition.kubescape.io/applicationprofilesummaries/local-path-storage/local-path-storage-replicaset-local-path-provisioner-75f5b54ffd-763c-36ba.g",
"/data/spdx.softwarecomposition.kubescape.io/applicationprofilesummaries/local-path-storage/local-path-storage-replicaset-local-path-provisioner-75f5b54ffd-763c-36ba.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/default/deployment-nginx.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/default/deployment-nginx.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/default/deployment-redis.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/default/deployment-redis.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/gadget/daemonset-gadget.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/gadget/daemonset-gadget.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-gateway.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-gateway.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-kubescape.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-kubescape.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-kubevuln.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-kubevuln.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-operator.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-operator.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-otel-collector.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-otel-collector.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-synchronizer.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/deployment-synchronizer.m",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/statefulset-kollector.g",
"/data/spdx.softwarecomposition.kubescape.io/networkneighborses/kubescape/statefulset-kollector.m",
"/data/spdx.softwarecomposition.kubescape.io/openvulnerabilityexchangecontainers/kubescape/quay.io-matthiasb-1-storage-debug-76f234.g",
"/data/spdx.softwarecomposition.kubescape.io/openvulnerabilityexchangecontainers/kubescape/quay.io-matthiasb-1-storage-debug-76f234.m",
"/data/spdx.softwarecomposition.kubescape.io/openvulnerabilityexchangecontainers/kubescape/quay.io-matthiasb-1-synchronizer-latest-63825b.g",
Expand Down

0 comments on commit 7cf5181

Please sign in to comment.