aws / aws-network-policy-agent

Apache License 2.0
45 stars 29 forks source link

CLI changes #152

Closed jayanthvn closed 10 months ago

jayanthvn commented 10 months ago

Issue #, if available: #150

Description of changes: Walk for cli was skipping because we used to check on SDK cache and that will be available only during recovery.

Additionally port/protocol is an array and as part of this we will print all ports/protocols

*******************************
Key : IP/Prefixlen - 192.168.81.90/32 
-------------------
Value Entry :  0
Protocol -  TCP
StartPort -  8080
Endport -  0
-------------------
-------------------
Value Entry :  1
Protocol -  ANY PROTOCOL
StartPort -  8080
Endport -  0
-------------------
PinPath:  /sys/fs/bpf/globals/aws/programs/source-controller-56ccbf8db8-flux-system_handle_ingress
Pod Identifier : source-controller-56ccbf8db8-flux-system  Direction : ingress 
Prog ID:  151
Associated Maps -> 
Map Name:  aws_conntrack_map
Map ID:  5
Map Name:  ingress_map
Map ID:  149
Map Name:  policy_events
Map ID:  6

This needs SDK release so making it a draft for now...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

jayanthvn commented 10 months ago

Pending SDK release..