aws / aws-network-policy-agent

Apache License 2.0
45 stars 29 forks source link

Add --ignore-loopback flag to exclude self-referential pod connections, updating cyclonus. #317

Open yash97 opened 1 month ago

yash97 commented 1 month ago

Issue #, if available:

Description of changes:

This PR introduces the --ignore-loopback=true parameter to exclude test cases where a network policy blocks a pod's connection to itself. Our network policy agent attaches tc cls hooks on the host veth side, not on the container's loopback interface. Consequently, self-referential connection tests may fail, as they don't accurately reflect our agent's behavior.

This flag allows for more accurate testing by focusing on inter-pod and external communications, aligning test results with our network policy agent's actual capabilities.

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

jaydeokar commented 1 month ago

Can you check this against v6 too ? We also need to change the python script which we run to validate the results