Add PolicyTypes to allow-all egress policy (#7895)
`PolicyTypes` default to `["Egress", "Ingress"]`, it doesn't make sense for egress-only policy to have `Ingress` as PolicyType.
This commit is contained in:
committed by
k8s-ci-robot
parent
84c8fad62a
commit
b02b212bec
@@ -162,6 +162,8 @@ spec:
|
|||||||
podSelector: {}
|
podSelector: {}
|
||||||
egress:
|
egress:
|
||||||
- {}
|
- {}
|
||||||
|
policyTypes:
|
||||||
|
- Egress
|
||||||
```
|
```
|
||||||
|
|
||||||
### Default deny all ingress and all egress traffic
|
### Default deny all ingress and all egress traffic
|
||||||
@@ -186,4 +188,4 @@ This ensures that even pods that aren't selected by any other NetworkPolicy will
|
|||||||
|
|
||||||
- See the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/)
|
- See the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/)
|
||||||
walkthrough for further examples.
|
walkthrough for further examples.
|
||||||
- See more [Recipes](https://github.com/ahmetb/kubernetes-network-policy-recipes) for common scenarios enabled by the NetworkPolicy resource.
|
- See more [Recipes](https://github.com/ahmetb/kubernetes-network-policy-recipes) for common scenarios enabled by the NetworkPolicy resource.
|
||||||
|
|||||||
Reference in New Issue
Block a user