mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
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:
parent
8c300565c2
commit
e0caf0b46f
@ -4157,7 +4157,7 @@ func printNetworkPolicySpecEgressTo(npers []networkingv1.NetworkPolicyEgressRule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(nper.To) == 0 {
|
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 {
|
} else {
|
||||||
for _, to := range nper.To {
|
for _, to := range nper.To {
|
||||||
w.Write(LEVEL_0, "%s%s\n", initialIndent, "To:")
|
w.Write(LEVEL_0, "%s%s\n", initialIndent, "To:")
|
||||||
|
@ -3480,7 +3480,7 @@ Spec:
|
|||||||
Except: 192.168.3.0/24, 192.168.4.0/24
|
Except: 192.168.3.0/24, 192.168.4.0/24
|
||||||
----------
|
----------
|
||||||
To Port: <any> (traffic allowed to all ports)
|
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
|
Policy Types: Ingress, Egress
|
||||||
`
|
`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user