This commit is contained in:
2025-04-08 13:44:32 +02:00
parent 9f3eaa6781
commit aafbb775bf
5 changed files with 67 additions and 124 deletions

View File

@@ -0,0 +1,38 @@
apiVersion: projectcalico.org/v3
kind: NetworkPolicy
metadata:
name: default-deny
namespace: unifi-network-operator-system
spec:
ingress:
- action: Deny
egress:
- action: Deny
---
apiVersion: projectcalico.org/v3
kind: NetworkPolicy
metadata:
name: allow-all-in-namespace
namespace: unifi-network-operator-system # Change this to your namespace
spec:
ingress:
- action: Allow
source:
namespaceSelector: kubernetes.io/metadata.name == "unifi-network-operator-system"
egress:
- action: Allow
destination:
namespaceSelector: kubernetes.io/metadata.name == "unifi-network-operator-system"
selector: all() # Applies this policy to all pods in the namespace
---
apiVersion: projectcalico.org/v3
kind: NetworkPolicy
metadata:
name: allow-all-temporary
namespace: unifi-network-operator-system
spec:
egress:
- action: Allow
ingress:
- action: Allow
---