-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
connectivity: introduce host firewall tests
Introduce two new tests covering the host firewall functionality, i.e., asserting that both ingress and egress CiliumClusterwideNetworkPolicies specifying a NodeSelector correctly block the expected traffic. The tests are executed only when the unsafe tests are enabled, as potentially disruptive if executed against a live cluster. Signed-off-by: Marco Iorio <[email protected]>
- Loading branch information
1 parent
6349fd4
commit 7a928d6
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: "cilium.io/v2" | ||
kind: CiliumClusterwideNetworkPolicy | ||
metadata: | ||
name: "host-firewall-egress" | ||
spec: | ||
nodeSelector: {} | ||
egress: | ||
- toEntities: | ||
- health | ||
- kube-apiserver | ||
- remote-node | ||
- world | ||
- toEndpoints: | ||
- matchExpressions: | ||
- key: name | ||
operator: NotIn | ||
values: | ||
- echo-other-node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: "cilium.io/v2" | ||
kind: CiliumClusterwideNetworkPolicy | ||
metadata: | ||
name: "host-firewall-ingress" | ||
spec: | ||
nodeSelector: {} | ||
ingress: | ||
- fromEntities: | ||
- health | ||
- kube-apiserver | ||
- remote-node | ||
- world | ||
- fromEndpoints: | ||
- matchExpressions: | ||
- key: name | ||
operator: NotIn | ||
values: | ||
- client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters