Skip to content

Commit

Permalink
sending right logger to pe for list cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jan 16, 2025
1 parent 8c3dab3 commit fec702a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/netpol/connlist/connlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,15 @@ func (ca *ConnlistAnalyzer) connsListFromParsedResources(objectsList []parser.K8
// ConnlistFromK8sClusterWithPolicyAPI returns the allowed connections list from k8s cluster resources, and list of all peers names
func (ca *ConnlistAnalyzer) ConnlistFromK8sClusterWithPolicyAPI(clientset *kubernetes.Clientset,
policyAPIClientset *policyapi.Clientset) ([]Peer2PeerConnection, []Peer, error) {
pe := eval.NewPolicyEngineWithOptions(ca.exposureAnalysis)

pe, err := eval.NewPolicyEngineWithOptionsList(eval.WithLogger(ca.logger))
if ca.exposureAnalysis {
pe, err = eval.NewPolicyEngineWithOptionsList(eval.WithExposureAnalysis(), eval.WithLogger(ca.logger))
}
if err != nil {
return nil, nil, err
}
// insert namespaces, pods and network-policies from k8s clientset
err := updatePolicyEngineWithK8sBasicObjects(pe, clientset)
err = updatePolicyEngineWithK8sBasicObjects(pe, clientset)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit fec702a

Please sign in to comment.