Skip to content

Commit

Permalink
update to cyclonus v0.3.1; update USAGE/README examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfenwick committed Mar 5, 2021
1 parent a3cea0a commit 28581f9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Groups policies by target, divides rules into egress and ingress, and gives a ba
policies. This clarifies the interactions between "denies" and "allows" from multiple policies.

```
$ kubectl cyclonus
$ kubectl cyclonus --mode explain -A
+---------+---------------+------------------------+---------------------+--------------------------+
| TYPE | TARGET | SOURCE RULES | PEER | PORT/PROTOCOL |
Expand Down Expand Up @@ -78,7 +78,7 @@ to a pod.

```
$ kubectl cyclonus \
--explain=false \
--mode query-target \
--target-pod-path ./examples/targets.json
Combined rules for pod {Namespace:y Labels:map[pod:a]}:
Expand Down Expand Up @@ -109,7 +109,7 @@ this command parses network policies and determines if the traffic is allowed or

```
$ kubectl cyclonus \
--explain=false \
--mode query-traffic \
--traffic-path ./examples/traffic.json
Traffic:
Expand Down Expand Up @@ -147,7 +147,7 @@ Runs a simulated connectivity probe against a set of network policies, without u

```
$ kubectl cyclonus \
--explain=false \
--mode probe \
--probe-path ./examples/probe.json
Combined:
Expand All @@ -172,7 +172,7 @@ Checks network policies for common problems.

```
$ kubectl cyclonus \
--explain=false \
--mode lint \
--lint=true
+-----------------+------------------------------+-------------------+-----------------------------+
Expand Down
10 changes: 5 additions & 5 deletions doc/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ kubectl krew install cyclonus
### Lint your kubernetes network policies

```shell
kubectl cyclonus --explain=false --lint=true
kubectl cyclonus --mode lint -A
```

### Check whether your policies will allow or deny specific traffic

```shell
kubectl cyclonus --explain=false --traffic-path ./examples/traffic.json
kubectl cyclonus --mode query-traffic --traffic-path ./examples/traffic.json
```

### Understand connectivity matrix allowed by your network policies

```shell
kubectl cyclonus --explain=false --probe-path ./examples/probe.json
kubectl cyclonus --mode probe --probe-path ./examples/probe.json
```

### Check which policies apply to a pod

```shell
kubectl cyclonus --explain=false --target-pod-path ./examples/targets.json
kubectl cyclonus --mode query-target --target-pod-path ./examples/targets.json
```

### Analyze network policies from files only

```shell
kubectl cyclonus --policy-path $PATH --all-namespaces=false
kubectl cyclonus --mode explain --policy-path $PATH
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.15

require (
github.com/fatih/color v1.9.0
github.com/mattfenwick/cyclonus v0.2.4
github.com/mattfenwick/cyclonus v0.3.1
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.6.0
k8s.io/client-go v0.19.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mattfenwick/cyclonus v0.2.4 h1:kguTvPaKzP/RPqU86I/ccl+vAzVcejwaK9nqE/5KaFc=
github.com/mattfenwick/cyclonus v0.2.4/go.mod h1:TNYOcMGoYElUq0PCHB++N03xrtBhiluWDRTj5pjsIOU=
github.com/mattfenwick/cyclonus v0.3.1 h1:yGT5GOEiajL5KdsRkl2KC2crr/fVCvfTOtoP5TTHJdE=
github.com/mattfenwick/cyclonus v0.3.1/go.mod h1:TNYOcMGoYElUq0PCHB++N03xrtBhiluWDRTj5pjsIOU=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
Expand Down

0 comments on commit 28581f9

Please sign in to comment.