Skip to content

Commit 2282866

Browse files
authored
Merge pull request #75873 from rh-tokeefe/OSSM-6383
OSSM-6383: OSSM in clusterwide mode can include ALL cluster projects
2 parents c556efe + 03decc5 commit 2282866

File tree

2 files changed

+44
-14
lines changed

2 files changed

+44
-14
lines changed

modules/ossm-excluding-namespaces-from-cluster-wide-mesh-cli.adoc

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
[id="ossm-excluding-namespaces-from-cluster-wide-mesh-cli_{context}"]
66
= Including and excluding namespaces from a cluster-wide mesh by using the CLI
77

8-
By default, the {SMProductName} Operator uses discovery selectors to identify the namespaces that make up the mesh. Namespaces that do not contain the label defined in the `ServiceMeshMemberRoll` resource are not matched by the discovery selector and are excluded from the mesh.
9-
8+
Using the {product-title} CLI, you can add discovery selectors to the `ServiceMeshControlPlane` resource in a cluster-wide mesh. Discovery selectors define the namespaces that the control plane can discover. The control plane ignores any namespace that does not match one of the discovery selectors, which excludes the namespace from the mesh.
9+
10+
[NOTE]
11+
====
12+
If you install ingress or egress gateways in the control plane namespace, you must include the control plane namespace in the discovery selectors.
13+
====
14+
1015
.Prerequisites
1116

1217
* You have installed the {SMProductName} Operator.
@@ -25,7 +30,14 @@ $ oc -n istio-system edit smcp <name> <1>
2530
----
2631
<1> `<name>` represents the name of the `ServiceMeshControlPlane` resource.
2732

28-
. Modify the YAML file so that the `spec.discoverySelectors` field of the `ServiceMeshMemberRoll` resource includes the discovery selector. The following example uses `istio-discovery: enabled`:
33+
. Modify the YAML file so that the `spec.meshConfig` field of the `ServiceMeshControlPlane` resource includes the discovery selector.
34+
+
35+
[NOTE]
36+
====
37+
When configuring namespaces that the `Istiod` service can discover, exclude namespaces that might contain sensitive services that should not be exposed to the rest of the mesh.
38+
====
39+
+
40+
In the following example, the `Istiod` service discovers any namespace that is labeled `istio-discovery: enabled` or any namespace that has the name `bookinfo`, `httpbin` or `istio-system`:
2941
+
3042
[source,yaml]
3143
----
@@ -41,12 +53,15 @@ spec:
4153
istio-discovery: enabled <1>
4254
- matchExpressions:
4355
- key: kubernetes.io/metadata.name <2>
44-
operator: NotIn
56+
operator: In
4557
values:
4658
- bookinfo
4759
- httpbin
60+
- istio-system
4861
----
49-
<1> Ensures that the mesh discovers namespaces that contain the label `istio-discovery: enabled`. The mesh does not discover namespaces that do not contain the label.
50-
<2> Ensures that the mesh does not discover namespaces `bookinfo` and `httpbin`.
62+
<1> Ensures that the mesh discovers namespaces that contain the label `istio-discovery: enabled`.
63+
<2> Ensures that the mesh discovers namespaces `bookinfo`, `httpbin` and `istio-system`.
64+
+
65+
If a namespace matches any of the discovery selectors, then the mesh discovers the namespace. The mesh excludes namespaces that do not match any of the discovery selectors.
5166

52-
. Save the file and exit the editor.
67+
. Save the file and exit the editor.

modules/ossm-excluding-namespaces-from-cluster-wide-mesh-console.adoc

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
:_mod-docs-content-type: PROCEDURE
55
[id="ossm-excluding-namespaces-from-cluster-wide-mesh-console_{context}"]
66
= Including and excluding namespaces from a cluster-wide mesh by using the web console
7-
8-
By default, the {SMProductName} Operator uses discovery selectors to identify the namespaces that make up the mesh. Namespaces that do not contain the label defined in the `ServiceMeshMemberRoll` resource are not matched by the discovery selector and are excluded from the mesh.
9-
7+
8+
Using the {product-title} web console, you can add discovery selectors to the `ServiceMeshControlPlane` resource in a cluster-wide mesh. Discovery selectors define the namespaces that the control plane can discover. The control plane ignores any namespace that does not match one of the discovery selectors, which excludes the namespace from the mesh.
9+
10+
[NOTE]
11+
====
12+
If you install ingress or egress gateways in the control plane namespace, you must include the control plane namespace in the discovery selectors.
13+
====
14+
1015
.Prerequisites
1116

1217
* You have installed the {SMProductName} Operator.
@@ -27,7 +32,14 @@ By default, the {SMProductName} Operator uses discovery selectors to identify th
2732

2833
. Click *YAML*.
2934

30-
. Modify the YAML file so that the `spec.discoverySelectors` field of the `ServiceMeshMemberRoll` resource includes the discovery selector. The following example uses `istio-discovery: enabled`:
35+
. Modify the YAML file so that the `spec.meshConfig` field of the `ServiceMeshControlPlane` resource includes the discovery selector.
36+
+
37+
[NOTE]
38+
====
39+
When configuring namespaces that the `Istiod` service can discover, exclude namespaces that might contain sensitive services that should not be exposed to the rest of the mesh.
40+
====
41+
+
42+
In the following example, the `Istiod` service discovers any namespace that is labeled `istio-discovery: enabled` or any namespace that has the name `bookinfo`, `httpbin` or `istio-system`:
3143
+
3244
[source,yaml]
3345
----
@@ -43,12 +55,15 @@ spec:
4355
istio-discovery: enabled <1>
4456
- matchExpressions:
4557
- key: kubernetes.io/metadata.name <2>
46-
operator: NotIn
58+
operator: In
4759
values:
4860
- bookinfo
4961
- httpbin
62+
- istio-system
5063
----
51-
<1> Ensures that the mesh discovers namespaces that contain the label `istio-discovery: enabled`. The mesh does not discover namespaces that do not contain the label.
52-
<2> Ensures that the mesh does not discover namespaces `bookinfo` and `httpbin`.
64+
<1> Ensures that the mesh discovers namespaces that contain the label `istio-discovery: enabled`.
65+
<2> Ensures that the mesh discovers namespaces `bookinfo`, `httpbin` and `istio-system`.
66+
+
67+
If a namespace matches any of the discovery selectors, then the mesh discovers the namespace. The mesh excludes namespaces that do not match any of the discovery selectors.
5368

5469
. Save the file.

0 commit comments

Comments
 (0)