chore: simpler network policy

This commit is contained in:
2025-09-03 23:57:25 +02:00
parent e0dddb70ec
commit 5d11fe9763
+2 -33
View File
@@ -10,52 +10,21 @@ spec:
- Ingress - Ingress
- Egress - Egress
ingress: ingress:
# Allow inbound traffic from the ingress controller only # Allow inbound traffic to container port
- from: - from:
- namespaceSelector:
matchLabels:
name: ingress-nginx
ports:
- protocol: TCP
port: 8000
# Allow inbound traffic from kubelet for health checks
- from:
- namespaceSelector:
matchLabels:
name: kube-system
ports: ports:
- protocol: TCP - protocol: TCP
port: 8000 port: 8000
egress: egress:
# Allow outbound DNS resolution # Allow outbound DNS resolution
- to: - to:
- namespaceSelector:
matchLabels:
name: kube-system
ports: ports:
- protocol: TCP - protocol: TCP
port: 53 port: 53
- protocol: UDP - protocol: UDP
port: 53 port: 53
# Allow outbound HTTPS to Kubernetes API server # Allow outbound HTTPS
- to: - to:
- namespaceSelector:
matchLabels:
name: kube-system
ports: ports:
- protocol: TCP - protocol: TCP
port: 443 port: 443
# Allow outbound HTTPS to Infomaniak S3
- to:
- ipBlock:
cidr: 45.157.188.56/29 # Infomaniak S3 IPv4 range
ports:
- protocol: TCP
port: 443
# Allow outbound NTP for time synchronization
- to:
- ipBlock:
cidr: 0.0.0.0/0
ports:
- protocol: UDP
port: 123