Skip to content

Commit fd02f51

Browse files
Merge pull request #80047 from dfitzmau/OSDOCS-4782
OSDOCS-4782: Added HostNetwork note to Using the network policy
2 parents b6ee264 + eb6a16a commit fd02f51

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/nw-networkpolicy-about.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ spec:
6262
6363
* Only accept connections from pods within a project:
6464
+
65+
[IMPORTANT]
66+
====
67+
To allow ingress connections from `hostNetwork` pods in the same namespace, you need to apply the `allow-from-hostnetwork` policy together with the `allow-same-namespace` policy.
68+
====
69+
+
6570
To make pods accept connections from other pods in the same project, but reject all other connections from pods in other projects, add the following `NetworkPolicy` object:
6671
+
6772
[source,yaml]
@@ -150,11 +155,10 @@ spec:
150155
----
151156
<1> `policy-group.network.openshift.io/ingress:""` label supports both OpenShift-SDN and OVN-Kubernetes.
152157

153-
154158
[id="nw-networkpolicy-allow-from-hostnetwork_{context}"]
155159
== Using the allow-from-hostnetwork network policy
156160

157-
Add the following `allow-from-hostnetwork` `NetworkPolicy` object to direct traffic from the host network pods:
161+
Add the following `allow-from-hostnetwork` `NetworkPolicy` object to direct traffic from the host network pods.
158162

159163
[source,yaml]
160164
----

0 commit comments

Comments
 (0)