@@ -60,7 +60,7 @@ func ConvertKnoxSystemPolicyToKubeArmorPolicy(knoxPolicies []types.KnoxSystemPol
60
60
61
61
kubePolicy .Spec = policy .Spec
62
62
63
- if kubePolicy .Kind == "KubeArmorPolicy" {
63
+ if kubePolicy .Kind == "KubeArmorPolicy" && policy . Spec . Action == "Allow" {
64
64
dirRule := types.KnoxMatchDirectories {
65
65
Dir : types .PreConfiguredKubearmorRule ,
66
66
Recursive : true ,
@@ -469,17 +469,21 @@ func StartKubeArmorRelay(StopChan chan struct{}, cfg types.ConfigKubeArmorRelay)
469
469
}
470
470
471
471
kubearmorLog := pb.Log {
472
- ClusterName : res .ClusterName ,
473
- ContainerName : res .ContainerName ,
474
- HostName : res .HostName ,
475
- NamespaceName : res .NamespaceName ,
476
- PodName : res .PodName ,
477
- Source : res .Source ,
478
- Operation : res .Operation ,
479
- Resource : res .Resource ,
480
- Data : res .Data ,
481
- Result : res .Result ,
482
- Type : res .Type ,
472
+ ClusterName : res .ClusterName ,
473
+ ContainerName : res .ContainerName ,
474
+ ContainerID : res .ContainerID ,
475
+ HostName : res .HostName ,
476
+ NamespaceName : res .NamespaceName ,
477
+ PodName : res .PodName ,
478
+ Source : res .Source ,
479
+ Operation : res .Operation ,
480
+ Resource : res .Resource ,
481
+ Data : res .Data ,
482
+ Result : res .Result ,
483
+ Type : res .Type ,
484
+ ProcessName : res .ProcessName ,
485
+ ParentProcessName : res .ParentProcessName ,
486
+ Timestamp : res .Timestamp ,
483
487
}
484
488
485
489
if ignoreLogFromRelayWithNamespace (nsFilter , nsNotFilter , & kubearmorLog ) {
0 commit comments