Skip to content

Commit 07c6b5c

Browse files
committed
OTA-1521: Add a default-deny network policy for CVO namespace
Add a baseline NetworkPolicy to deny all network communication (both ingress and egress) to all pods in the namespace. Any necessary network traffic needs to be allowed by an additional NetworkPolicy resource (they are additive). At the moment, the default deny all policy should be the only one needed: - CVO is host-networked so it is [not affected by network policies](https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/networking/network-security#network-policy) - Bare `version` pods spawned by CVO do not require any network communication See [OTA Network Policies Working Document](https://docs.google.com/document/d/1Dzr3eYGVl6OBxqfUohugJLsbsn7sYrC3fN6yCe8zTRQ/edit?tab=t.0#heading=h.9vehq2liufe) for more information.
1 parent db8190f commit 07c6b5c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
# This NetworkPolicy is used to deny all ingress and egress traffic by default in this namespace,
5+
# serving as a baseline. At the moment no other Network Policy should be needed:
6+
# - CVO is a host-networked Pod, so it is not affected by network policies
7+
# - Bare `version` Pods spawned by CVO do not require any network communication
8+
name: default-deny
9+
namespace: openshift-cluster-version
10+
spec:
11+
# Match all pods in the namespace
12+
podSelector: {}
13+
policyTypes:
14+
- Ingress
15+
- Egress

0 commit comments

Comments
 (0)