cilium-cli
cilium-cli copied to clipboard
Add CLI argument for specifying CiliumNetworkPolicies in Performance Tests
Introduces the CLI argument --perf-policy-file, which allows for users to specify custom CiliumNetworkPolicies when running
performance tests, for use in demos or other situations where the something besides the default is desired.
Example usage:
⯠./cilium connectivity test --perf --perf-duration=1s --perf-policy-file=./my-policy.yaml --verbose
...
[=] Test [network-perf]
âšī¸ đ Applying CiliumNetworkPolicy 'my-policy' to namespace 'cilium-test'..
[-] Scenario [network-perf/perf-pod-to-pod]
[.] Action [network-perf/perf-pod-to-pod/netperf: cilium-test/perf-client-668f667cd5-kbwsr (10.244.3.161) -> cilium-test/perf-server-84bf59fcf-q9txx (10.244.3.75:5201)]
[.] Action [network-perf/perf-pod-to-pod/netperf: cilium-test/perf-client-other-node-5699666544-cp2lw (10.244.2.189) -> cilium-test/perf-server-84bf59fcf-q9txx (10.244.3.75:5201)]
âšī¸ đ Deleting CiliumNetworkPolicy 'my-policy' from namespace 'cilium-test'..
đĨ Performance Test Summary
-----------------------------------------------------------------------------------------------------------------------------
đ Scenario | Test | Num Samples | Duration | Avg value
-----------------------------------------------------------------------------------------------------------------------------
đ perf-client-other-node-5699666544-cp2lw | UDP_STREAM | 1 | 1s | 800.36 (Mb/s)
đ perf-client-668f667cd5-kbwsr | TCP_RR | 1 | 1s | 45366.61 (OP/s)
đ perf-client-668f667cd5-kbwsr | TCP_STREAM | 1 | 1s | 2113.75 (Mb/s)
đ perf-client-668f667cd5-kbwsr | UDP_RR | 1 | 1s | 44847.80 (OP/s)
đ perf-client-668f667cd5-kbwsr | UDP_STREAM | 1 | 1s | 2594.78 (Mb/s)
đ perf-client-other-node-5699666544-cp2lw | TCP_RR | 1 | 1s | 22060.88 (OP/s)
đ perf-client-other-node-5699666544-cp2lw | TCP_STREAM | 1 | 1s | 1127.11 (Mb/s)
đ perf-client-other-node-5699666544-cp2lw | UDP_RR | 1 | 1s | 25126.35 (OP/s)
-----------------------------------------------------------------------------------------------------------------------------
â
All 1 tests (2 actions) successful, 0 tests skipped, 0 scenarios skipped.
If a given policy file cannot be read, then an error is thrown and the test is cancelled:
⯠./cilium connectivity test --perf --perf-duration=1s --perf-policy-file=doesnotexist.yaml --verbose
...
âšī¸ Cilium version: 1.11.3
connectivity test failed: unable to read user given policy file 'doesnotexist.yaml' for performance tests: open doesnotexist.yaml: no such file or directory
Signed-off-by: Ryan Drew [email protected]