|
2 | 2 |
|
3 | 3 | // * networking/network_observability/network-observability-network-policy.adoc |
4 | 4 |
|
| 5 | +//03/31/2026: Include removed from assembly with 1.10. Remove when network observability docs move to the stand alone format as part of Clean the repo task. DITA changes made to pass Vale checks for March 31 deadline as move to stand alone will happen after March 31 deadline. |
5 | 6 |
|
6 | 7 | :_mod-docs-content-type: PROCEDURE |
7 | 8 | [id="network-observability-network-policy_{context}"] |
8 | 9 | = Creating a network policy for network observability |
9 | 10 |
|
10 | | -If you want to further customize the network policies for the `netobserv` and `netobserv-privileged` namespaces, you must disable the managed installation of the policy from the `FlowCollector` CR, and create your own. You can use the network policy resources that are enabled from the `FlowCollector` CR as a starting point for the procedure that follows: |
| 11 | +[role="_abstract"] |
| 12 | +Customize network policies for the `netobserv` and `netobserv-privileged` namespaces by disabling the managed installation in the FlowCollector resource. Use the default managed policies as a template to create manual network policy configurations that meet specific security requirements. |
11 | 13 |
|
| 14 | +.Procedure |
| 15 | +. Navigate to *Networking* -> *NetworkPolicies*. |
| 16 | +. Select the `netobserv` project from the *Project* dropdown menu. |
| 17 | +. Name the policy. For this example, the policy name is `allow-ingress`. |
| 18 | +. Click *Add ingress rule* three times to create three ingress rules. |
| 19 | +. Specify the following in the form: |
| 20 | +.. Make the following specifications for the first *Ingress rule*: |
| 21 | +... From the *Add allowed source* dropdown menu, select *Allow pods from the same namespace*. |
| 22 | +.. Make the following specifications for the second *Ingress rule*: |
| 23 | +... From the *Add allowed source* dropdown menu, select *Allow pods from inside the cluster*. |
| 24 | +... Click *+ Add namespace selector*. |
| 25 | +... Add the label, `kubernetes.io/metadata.name`, and the selector, `openshift-console`. |
| 26 | +.. Make the following specifications for the third *Ingress rule*: |
| 27 | +... From the *Add allowed source* dropdown menu, select *Allow pods from inside the cluster*. |
| 28 | +... Click *+ Add namespace selector*. |
| 29 | +... Add the label, `kubernetes.io/metadata.name`, and the selector, `openshift-monitoring`. |
| 30 | ++ |
12 | 31 | .Example `netobserv` network policy |
13 | 32 | [source,yaml] |
14 | 33 | ---- |
|
36 | 55 | policyTypes: |
37 | 56 | - Ingress |
38 | 57 | ---- |
39 | | - |
| 58 | ++ |
40 | 59 | .Example `netobserv-privileged` network policy |
41 | 60 | [source,yaml] |
42 | 61 | ---- |
|
56 | 75 | - Ingress |
57 | 76 | ---- |
58 | 77 |
|
59 | | -.Procedure |
60 | | -. Navigate to *Networking* -> *NetworkPolicies*. |
61 | | -. Select the `netobserv` project from the *Project* dropdown menu. |
62 | | -. Name the policy. For this example, the policy name is `allow-ingress`. |
63 | | -. Click *Add ingress rule* three times to create three ingress rules. |
64 | | -. Specify the following in the form: |
65 | | -.. Make the following specifications for the first *Ingress rule*: |
66 | | -... From the *Add allowed source* dropdown menu, select *Allow pods from the same namespace*. |
67 | | -.. Make the following specifications for the second *Ingress rule*: |
68 | | -... From the *Add allowed source* dropdown menu, select *Allow pods from inside the cluster*. |
69 | | -... Click *+ Add namespace selector*. |
70 | | -... Add the label, `kubernetes.io/metadata.name`, and the selector, `openshift-console`. |
71 | | -.. Make the following specifications for the third *Ingress rule*: |
72 | | -... From the *Add allowed source* dropdown menu, select *Allow pods from inside the cluster*. |
73 | | -... Click *+ Add namespace selector*. |
74 | | -... Add the label, `kubernetes.io/metadata.name`, and the selector, `openshift-monitoring`. |
75 | | - |
76 | 78 | .Verification |
77 | 79 | . Navigate to *Observe* -> *Network Traffic*. |
78 | 80 | . View the *Traffic Flows* tab, or any tab, to verify that the data is displayed. |
79 | | -. Navigate to *Observe* -> *Dashboards*. In the NetObserv/Health selection, verify that the flows are being ingested and sent to Loki, which is represented in the first graph. |
| 81 | +. Navigate to *Observe* -> *Dashboards*. In the NetObserv/Health selection, verify that the flows are being ingested and sent to Loki, which is represented in the first graph. |
0 commit comments