mirror of https://github.com/k3s-io/k3s
Describe PolicyTypes for Network Policy.
parent
1aaac98e7a
commit
3921ac9dd1
|
@ -3116,6 +3116,7 @@ func describeNetworkPolicySpec(nps networking.NetworkPolicySpec, w PrefixWriter)
|
|||
printNetworkPolicySpecIngressFrom(nps.Ingress, " ", w)
|
||||
w.Write(LEVEL_1, "Allowing egress traffic:\n")
|
||||
printNetworkPolicySpecEgressTo(nps.Egress, " ", w)
|
||||
w.Write(LEVEL_1, "Policy Types: %v\n", nps.PolicyTypes)
|
||||
}
|
||||
|
||||
func printNetworkPolicySpecIngressFrom(npirs []networking.NetworkPolicyIngressRule, initialIndent string, w PrefixWriter) {
|
||||
|
|
|
@ -1682,6 +1682,7 @@ Spec:
|
|||
----------
|
||||
From Port: <any> (traffic allowed to all ports)
|
||||
To: <any> (traffic not restricted by source)
|
||||
Policy Types: [Ingress Egress]
|
||||
`
|
||||
|
||||
port80 := intstr.FromInt(80)
|
||||
|
@ -1793,6 +1794,7 @@ Spec:
|
|||
},
|
||||
{},
|
||||
},
|
||||
PolicyTypes: []networking.PolicyType{networking.PolicyTypeIngress, networking.PolicyTypeEgress},
|
||||
},
|
||||
})
|
||||
d := NetworkPolicyDescriber{versionedFake}
|
||||
|
|
Loading…
Reference in New Issue