Fix NetworkPolicy describe for egress-all policies

NetworkPolicy egress-all `kubectl describe` output should refer
to the term "destination" as opposed to "source" for describing
policies which do not restrict traffic based on the destination.
This commit is contained in:
Abhishek Raut 2020-07-15 18:58:25 -07:00
parent 8c300565c2
commit e0caf0b46f
2 changed files with 2 additions and 2 deletions

View File

@ -4157,7 +4157,7 @@ func printNetworkPolicySpecEgressTo(npers []networkingv1.NetworkPolicyEgressRule
}
}
if len(nper.To) == 0 {
w.Write(LEVEL_0, "%s%s\n", initialIndent, "To: <any> (traffic not restricted by source)")
w.Write(LEVEL_0, "%s%s\n", initialIndent, "To: <any> (traffic not restricted by destination)")
} else {
for _, to := range nper.To {
w.Write(LEVEL_0, "%s%s\n", initialIndent, "To:")

View File

@ -3480,7 +3480,7 @@ Spec:
Except: 192.168.3.0/24, 192.168.4.0/24
----------
To Port: <any> (traffic allowed to all ports)
To: <any> (traffic not restricted by source)
To: <any> (traffic not restricted by destination)
Policy Types: Ingress, Egress
`