Enable Cilium host firewall (#736)

This commit enables Cilium's host firewall feature and makes use of it
to deny external connections to two exporters running as daemonset pods
in the host network namespace.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Host firewall is now enabled by default, adding an extra layer of
security.
  - Enhanced network traffic management with new policies:
    - One policy tightens access to critical service ports.
- Another secures monitoring endpoints by restricting unauthorized
external access.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This commit is contained in:
Timofei Larkin
2025-04-02 15:16:15 +04:00
committed by GitHub
parent cd23a30e76
commit d9c6fb7625
3 changed files with 40 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
cilium:
kubeProxyReplacement: true
hostFirewall:
enabled: true
hubble:
enabled: false
externalIPs:

View File

@@ -0,0 +1,19 @@
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: restrict-drbd-reactor
spec:
ingressDeny:
- fromEntities:
- world
toPorts:
- ports:
- port: "9942"
ingress:
- fromEntities:
- world
- host
- cluster
nodeSelector:
matchLabels: {}

View File

@@ -0,0 +1,19 @@
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: restrict-node-exporter
spec:
ingressDeny:
- fromEntities:
- world
toPorts:
- ports:
- port: "9100"
ingress:
- fromEntities:
- world
- host
- cluster
nodeSelector:
matchLabels: {}