karmor probe cli incorrectly links policies to workload in different namespaces.
I am applying a policy to my cluster. To check that I got the labels correct and that the policy was applied to my workload, I ran the "karmor probe" command. I saw in the report that the policy was applied. After looking a little closer, I saw that I actually applied the policy to the default namespace, not the namespace where my workload was. "karmor probe" still linked them
General Information
Environment description GKE and Kind
Kernel version
Orchestration system version in use (e.g. kubectl version, ...)
$ kubectl version
Client Version: v1.31.1
Kustomize Version: v5.4.2
Server Version: v1.30.3-gke.196900
Link to relevant artifacts (policies, deployments scripts, ...)
In the included screen shot, you can see that there is only 1 policy on the system and that it is in the default namespace, yet the policy is listed under a workload in the validator namespace.
Expected behavior
In this example, the policy shouldn't be listed at all. There aren't any workloads that should apply.
Screenshots
If applicable, add screenshots to help explain your problem.
Bug Report
karmor probe cli incorrectly links policies to workload in different namespaces.
I am applying a policy to my cluster. To check that I got the labels correct and that the policy was applied to my workload, I ran the "karmor probe" command. I saw in the report that the policy was applied. After looking a little closer, I saw that I actually applied the policy to the default namespace, not the namespace where my workload was. "karmor probe" still linked them
General Information
kubectl version
, ...) $ kubectl version Client Version: v1.31.1 Kustomize Version: v5.4.2 Server Version: v1.30.3-gke.196900To Reproduce
In the included screen shot, you can see that there is only 1 policy on the system and that it is in the default namespace, yet the policy is listed under a workload in the validator namespace.
Expected behavior
In this example, the policy shouldn't be listed at all. There aren't any workloads that should apply.
Screenshots
If applicable, add screenshots to help explain your problem.