Skip to content

Commit

Permalink
add ExpectAllEgress
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfenwick committed Feb 19, 2020
1 parent 77c02e2 commit ce2494f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion netpol/pkg/utils/reachability.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,15 @@ func (r *Reachability) Expect(pod1 Pod, pod2 Pod, isConnected bool) {
func (r *Reachability) ExpectAllIngress(pod Pod, connected bool) {
r.Expected.SetAllTo(string(pod), connected)
if !connected {
log.Infof("Blacklisting all traffic to %s", pod)
log.Infof("Blacklisting all traffic *to* %s", pod)
}
}

// ExpectAllEgress defines that any traffic going out of the pod will be allowed/denied (true/false)
func (r *Reachability)ExpectAllEgress(pod Pod, connected bool) {
r.Expected.SetAllFrom(string(pod), connected)
if !connected {
log.Infof("Blacklisting all traffic *from* %s", pod)
}
}

Expand Down

0 comments on commit ce2494f

Please sign in to comment.