generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Netpol Assistant): data structures simulating connectivity matri…
…x for ANP/BANP
- Loading branch information
1 parent
262dc04
commit f7208d9
Showing
23 changed files
with
2,526 additions
and
786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,16 @@ | ||
# Cyclonus | ||
# NetworkPolicy Assistant (derived from Cyclonus) | ||
|
||
## Network policy explainer, prober, and test case generator | ||
Explains your configuration of (Baseline)AdminNetworkPolicy and v1 NetworkPolicy. Additionally, can test conformance of (B)ANP and v1 NetworkPolicy via a connectivity matrix. Derived from the great work of @mattfenwick et al. in [Cyclonus](https://github.com/mattfenwick/cyclonus). | ||
|
||
Parse, explain, and probe network policies to understand their implications and help design | ||
policies that suit your needs! | ||
More details here: [Cyclonus](https://github.com/mattfenwick/cyclonus). | ||
|
||
## Quickstart | ||
## Usage | ||
|
||
Users: check out our [Quickstart guide](./docs/quickstart.md) | ||
CLI currently under development. Will build off of `cyclonus analyze` (visualization) and `cyclonus generate` (conformance tests). | ||
|
||
Developers: check out our [Developer guide](./docs/developer-guide.md) | ||
## Development | ||
|
||
Cyclonus functionality: | ||
Integration tests located at *test/integration/integration_test.go*. The tests verify: | ||
|
||
- [run a single network policy test on a cluster](./docs/probe.md) | ||
- [run network policy conformance tests on a cluster](./docs/generator.md) | ||
- [understand test runs](./docs/test-runs.md) | ||
- [analyze network policies](./docs/analyze.md) | ||
|
||
|
||
## Integrations | ||
|
||
Cyclonus is available as a [**krew/kubectl plugin**](https://github.com/mattfenwick/kubectl-cyclonus): | ||
|
||
- [Set up krew](https://krew.sigs.k8s.io/docs/user-guide/quickstart/) | ||
- install: `kubectl krew install cyclonus` | ||
- use: `kubectl cyclonus -h` | ||
|
||
**Antrea testing**: [Cyclonus runs network policy tests for Antrea on a daily basis](https://github.com/vmware-tanzu/antrea/actions/workflows/netpol_cyclonus.yml). | ||
|
||
**Cilium testing**: [Cyclonus runs network policy tests for Cilium on a daily basis](https://github.com/cilium/cilium/pull/14889). | ||
|
||
**Sonobuoy plugin**: [run Cyclonus tests through Sonobuoy](./hack/sonobuoy). | ||
|
||
|
||
## Motivation and History | ||
|
||
Testing network policies for CNI providers on Kubernetes has historically been very difficult, requiring a lot of boiler plate. | ||
This was recently improved upstream via truth table based tests | ||
([see KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/1611-network-policy-validation)). | ||
Cyclonus is the next evolution of the truth table tests which are part of upstream Kubernetes. | ||
Cyclonus generates hundreds of network policies, their connectivity tables, and outputs results in the same, easy to read format. | ||
|
||
## Thanks to contributors | ||
|
||
- @dougsland | ||
- @jayunit100 | ||
- @johnSchnake | ||
- @enhaocui | ||
- @matmerr | ||
1. Building/translating NetPol spec into interim data structures (matchers). | ||
2. Simulation of expected connectivity for ANP, BANP, and v1 NetPols. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.