Skip to content

Commit

Permalink
Fix for k8s Networkpolicy not getting generated for CIDRs (#607)
Browse files Browse the repository at this point in the history
Signed-off-by: Eswar Rajan Subramanian <[email protected]>
  • Loading branch information
seswarrajan authored Nov 24, 2022
1 parent 5236a34 commit ae4eaf7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/networkpolicy/networkPolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -1944,6 +1944,10 @@ func convertKnoxNetworkLogToKnoxNetworkPolicy(log *types.KnoxNetworkLog, pods []
} else if log.Direction == "INGRESS" {
ingressPolicy = &iePolicy
}
// Update namespace
if iePolicy.Metadata["status"] == "latest" {
iePolicy.Metadata["namespace"] = log.SrcNamespace
}
}

if !isValidPolicy(ingressPolicy) {
Expand Down

0 comments on commit ae4eaf7

Please sign in to comment.