Skip to content

Commit 85f4159

Browse files
authored
Merge pull request #51239 from JStickler/OSSMDOC-520
OSSMDOC-520: Update traffic management headings and reorganize assembly.
2 parents eb638d2 + fac2a64 commit 85f4159

20 files changed

+349
-333
lines changed

modules/ossm-auto-route-annotations.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
//
44

55
[id="ossm-auto-route-annotations_{context}"]
6-
= {SMProductName} route labels and annotations
6+
= Route labels and annotations
77

8-
Sometimes specific labels or annotations are needed in an OpenShift Route.
8+
Sometimes specific labels or annotations are needed in an OpenShift route.
99
ifdef::openshift-enterprise[]
10-
For example, some advanced features in OpenShift Routes are managed using special annotations. See "Route-specific annotations" in the following "Additional resources" section.
10+
For example, some advanced features in OpenShift routes are managed using special annotations. See "Route-specific annotations" in the following "Additional resources" section.
1111
endif::[]
1212

13-
For this and other use cases, {SMProductName} will copy all labels and annotations present in the Istio Gateway resource (with the exception of annotations starting with `kubectl.kubernetes.io`) into the managed OpenShift Route resource.
13+
For this and other use cases, {SMProductName} will copy all labels and annotations present in the Istio gateway resource (with the exception of annotations starting with `kubectl.kubernetes.io`) into the managed OpenShift route resource.
1414

15-
If you need specific labels or annotations in the OpenShift Routes created by {SMProductShortName}, create them in the Istio Gateway resource and they will be copied into the OpenShift Route resources managed by the {SMProductShortName}.
15+
If you need specific labels or annotations in the OpenShift routes created by {SMProductShortName}, create them in the Istio gateway resource and they will be copied into the OpenShift route resources managed by the {SMProductShortName}.

modules/ossm-auto-route-enable.adoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,28 @@
33
//
44
:_content-type: REFERENCE
55
[id="ossm-auto-route-enable_{context}"]
6-
= Disabling automatic creation of routes
6+
= Disabling automatic route creation
77

8-
By default, the `ServiceMeshControlPlane` resource automatically synchronizes the Gateway resources with OpenShift routes. Disabling the automatic route creation allows you more flexibility to control routes if you have a special case or prefer to control routes manually.
8+
By default, the `ServiceMeshControlPlane` resource automatically synchronizes the Istio gateway resources with OpenShift routes. Disabling the automatic route creation allows you more flexibility to control routes if you have a special case or prefer to control routes manually.
99

1010
[id="disabling-automatic-route-creation-specific-cases_{context}"]
1111
== Disabling automatic route creation for specific cases
1212

13-
If you want to disable the automatic management of OpenShift routes for a specific Istio Gateway, you must add the annotation `maistra.io/manageRoute: false` to the Gateway metadata definition. {SMProductName} will ignore Istio Gateways with this annotation, while keeping the automatic management of the other Istio Gateways.
13+
If you want to disable the automatic management of OpenShift routes for a specific Istio gateway, you must add the annotation `maistra.io/manageRoute: false` to the gateway metadata definition. {SMProductName} will ignore Istio gateways with this annotation, while keeping the automatic management of the other Istio gateways.
1414

1515
[id="disabling-automatic-route-creation-all-cases_{context}"]
1616
== Disabling automatic route creation for all cases
1717

18-
You can disable the automatic management of OpenShift routes for all Gateways in your mesh.
18+
You can disable the automatic management of OpenShift routes for all gateways in your mesh.
1919

20-
Disable integration between Istio Gateways and OpenShift Routes by setting the `ServiceMeshControlPlane` field `gateways.openshiftRoute.enabled` to `false`. For example, see the following resource snippet.
20+
Disable integration between Istio gateways and OpenShift routes by setting the `ServiceMeshControlPlane` field `gateways.openshiftRoute.enabled` to `false`. For example, see the following resource snippet.
2121

2222
[source,yaml]
2323
----
24+
apiVersion: maistra.io/v1alpha1
25+
kind:
26+
metadata:
27+
namespace: istio-system
2428
spec:
2529
gateways:
2630
openshiftRoute:

modules/ossm-auto-route.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
- bookinfo.example.com
2828
----
2929

30-
The 'Gateway' resource creates the following OpenShift Routes. You can check that the routes are created by using the following command. In this example, `istio-system` is the name of the {SMProductShortName} control plane project.
30+
The `Gateway` resource creates the following OpenShift routes. You can check that the routes are created by using the following command. In this example, `istio-system` is the name of the {SMProductShortName} control plane project.
3131

3232
[source,terminal]
3333
----
@@ -42,4 +42,4 @@ gateway1-lvlfn bookinfo.example.com istio-ingressgateway <all>
4242
gateway1-scqhv www.bookinfo.com istio-ingressgateway <all> None
4343
----
4444

45-
If the gateway is deleted, {SMProductName} deletes the routes. However, routes created manually are never modified by {SMProductName}.
45+
If you delete the gateway, {SMProductName} deletes the routes. However, routes you have manually created are never modified by {SMProductName}.

modules/ossm-config-disable-networkpolicy.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This module included in the following assemblies:
44
////
55
:_content-type: PROCEDURE
66
[id="ossm-config-disable-networkpolicy_{context}"]
7-
= Disabling automatic creation of network policies
7+
= Disabling automatic NetworkPolicy creation
88

9-
If you want to disable the automatic creation and management of `NetworkPolicy` resources, for example to enforce company security policies, or to allow direct access to pods in the mesh, you can do so. You can edit the `ServiceMeshControlPlane` and set `spec.security.manageNetworkPolicy` to `false`.
9+
If you want to disable the automatic creation and management of `NetworkPolicy` resources, for example to enforce company security policies, or to allow direct access to pods in the mesh, you can do so. You can edit the `ServiceMeshControlPlane` and set `spec.security.manageNetworkPolicy` to `false`.
1010

1111
[NOTE]
1212
====
13-
When you disable `spec.security.manageNetworkPolicy` {SMProductName} will not create *any* `NetworkPolicy` objects. The system administrator is responsible for managing the network and fixing any issues this might cause.
13+
When you disable `spec.security.manageNetworkPolicy` {SMProductName} will not create *any* `NetworkPolicy` objects. The system administrator is responsible for managing the network and fixing any issues this might cause.
1414
====
1515

1616
.Prerequisites

modules/ossm-gateways.adoc

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * service_mesh/v1x/ossm-traffic-manage.adoc
4+
// * service_mesh/v2x/ossm-traffic-manage.adoc
5+
6+
:_content-type: CONCEPT
7+
[id="ossm-gateways_{context}"]
8+
= Using gateways
9+
10+
You can use a gateway to manage inbound and outbound traffic for your mesh to specify which traffic you want to enter or leave the mesh. Gateway configurations are applied to standalone Envoy proxies that are running at the edge of the mesh, rather than sidecar Envoy proxies running alongside your service workloads.
11+
12+
Unlike other mechanisms for controlling traffic entering your systems, such as the Kubernetes Ingress APIs, {SMProductName} gateways allow you to use the full power and flexibility of traffic routing. The {SMProductName} gateway resource can layer 4-6 load balancing properties, such as ports, to expose and configure {SMProductName} TLS settings. Instead of adding application-layer traffic routing (L7) to the same API resource, you can bind a regular {SMProductName} virtual service to the gateway and manage gateway traffic like any other data plane traffic in a service mesh.
13+
14+
Gateways are primarily used to manage ingress traffic, but you can also configure egress gateways. An egress gateway lets you configure a dedicated exit node for the traffic leaving the mesh. This enables you to limit which services have access to external networks, which adds security control to your service mesh. You can also use a gateway to configure a purely internal proxy.
15+
16+
.Gateway example
17+
18+
A gateway resource describes a load balancer operating at the edge of the mesh receiving incoming or outgoing HTTP/TCP connections. The specification describes a set of ports that should be exposed, the type of protocol to use, SNI configuration for the load balancer, and so on.
19+
20+
The following example shows a sample gateway configuration for external HTTPS ingress traffic:
21+
22+
[source,yaml]
23+
----
24+
apiVersion: networking.istio.io/v1alpha3
25+
kind: Gateway
26+
metadata:
27+
name: ext-host-gwy
28+
spec:
29+
selector:
30+
istio: ingressgateway # use istio default controller
31+
servers:
32+
- port:
33+
number: 443
34+
name: https
35+
protocol: HTTPS
36+
hosts:
37+
- ext-host.example.com
38+
tls:
39+
mode: SIMPLE
40+
serverCertificate: /tmp/tls.crt
41+
privateKey: /tmp/tls.key
42+
----
43+
44+
This gateway configuration lets HTTPS traffic from `ext-host.example.com` into the mesh on port 443, but doesn’t specify any routing for the traffic.
45+
46+
To specify routing and for the gateway to work as intended, you must also bind the gateway to a virtual service. You do this using the virtual service's gateways field, as shown in the following example:
47+
48+
[source,yaml]
49+
----
50+
apiVersion: networking.istio.io/v1alpha3
51+
kind: VirtualService
52+
metadata:
53+
name: virtual-svc
54+
spec:
55+
hosts:
56+
- ext-host.example.com
57+
gateways:
58+
- ext-host-gwy
59+
----
60+
61+
You can then configure the virtual service with routing rules for the external traffic.

modules/ossm-routing-bookinfo-example.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
// * service_mesh/v2x/ossm-traffic-manage.adoc
55

66
[id="ossm-routing-bookinfo_{context}"]
7-
= Routing tutorial
7+
= Bookinfo routing tutorial
88

99
The {SMProductShortName} Bookinfo sample application consists of four separate microservices, each with multiple versions. After installing the Bookinfo sample application, three different versions of the `reviews` microservice run concurrently.
1010

11-
When you access the Bookinfo app `/product` page in a browser and refresh several times, sometimes the book review output contains star ratings and other times it does not. Without an explicit default service version to route to, {SMProductShortName} routes requests to all available versions one after the other.
11+
When you access the Bookinfo app `/product` page in a browser and refresh several times, sometimes the book review output contains star ratings and other times it does not. Without an explicit default service version to route to, {SMProductShortName} routes requests to all available versions one after the other.
1212

1313
This tutorial helps you apply rules that route all traffic to `v1` (version 1) of the microservices. Later, you can apply a rule to route traffic based on the value of an HTTP request header.
1414

modules/ossm-routing-bookinfo-route.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * service_mesh/v1x/ossm-traffic-manage.adoc
4+
// * service_mesh/v2x/ossm-traffic-manage.adoc
15
:_content-type: PROCEDURE
26
[id="ossm-routing-bookinfo-route_{context}"]
37
= Route based on user identity
@@ -24,8 +28,8 @@ $ oc get virtualservice reviews -o yaml
2428

2529
. On the `/productpage` of the Bookinfo app, log in as user `jason` with no password.
2630
+
27-
.. Refresh the browser. The star ratings appear next to each review.
31+
. Refresh the browser. The star ratings appear next to each review.
2832

29-
. Log in as another user (pick any name you wish). Refresh the browser. Now the stars are gone. Traffic is now routed to `reviews:v1` for all users except Jason.
33+
. Log in as another user (pick any name you want). Refresh the browser. Now the stars are gone. Traffic is now routed to `reviews:v1` for all users except Jason.
3034

3135
You have successfully configured the Bookinfo sample application to route traffic based on user identity.

modules/ossm-routing-bookinfo-test.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * service_mesh/v1x/ossm-traffic-manage.adoc
4+
// * service_mesh/v2x/ossm-traffic-manage.adoc
15
:_content-type: PROCEDURE
26
[id="ossm-routing-bookinfo-test_{context}"]
37
= Testing the new route configuration
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * service_mesh/v1x/ossm-traffic-manage.adoc
4+
// * service_mesh/v2x/ossm-traffic-manage.adoc
5+
6+
:_content-type: CONCEPT
7+
[id="ossm-routing-destination-rules_{context}"]
8+
= Understanding destination rules
9+
10+
Destination rules are applied after virtual service routing rules are evaluated, so they apply to the traffic's real destination. Virtual services route traffic to a destination. Destination rules configure what happens to traffic at that destination.
11+
12+
By default, {SMProductName} uses a round-robin load balancing policy, where each service instance in the pool gets a request in turn. {SMProductName} also supports the following models, which you can specify in destination rules for requests to a particular service or service subset.
13+
14+
* Random: Requests are forwarded at random to instances in the pool.
15+
* Weighted: Requests are forwarded to instances in the pool according to a specific percentage.
16+
* Least requests: Requests are forwarded to instances with the least number of requests.
17+
18+
.Destination rule example
19+
20+
The following example destination rule configures three different subsets for the `my-svc` destination service, with different load balancing policies:
21+
22+
[source,yaml]
23+
----
24+
apiVersion: networking.istio.io/v1alpha3
25+
kind: DestinationRule
26+
metadata:
27+
name: my-destination-rule
28+
spec:
29+
host: my-svc
30+
trafficPolicy:
31+
loadBalancer:
32+
simple: RANDOM
33+
subsets:
34+
- name: v1
35+
labels:
36+
version: v1
37+
- name: v2
38+
labels:
39+
version: v2
40+
trafficPolicy:
41+
loadBalancer:
42+
simple: ROUND_ROBIN
43+
- name: v3
44+
labels:
45+
version: v3
46+
----

modules/ossm-routing-gateways.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Module included in the following assemblies:
22
//
3-
// * service_mesh/v1x/ossm-config.adoc
4-
// * service_mesh/v2x/ossm-config.adoc
3+
// * service_mesh/v1x/ossm-traffic-manage.adoc
4+
// * service_mesh/v2x/ossm-traffic-manage.adoc
55

66
:_content-type: PROCEDURE
7-
[id="ossm-routing-gateways_{context}"]
8-
= Configuring ingress using a gateway
7+
[id="ossm-routing-ingress-gateway_{context}"]
8+
= Configuring an ingress gateway
99

1010
An ingress gateway is a load balancer operating at the edge of the mesh that receives incoming HTTP/TCP connections. It configures exposed ports and protocols but does not include any traffic routing configuration. Traffic routing for ingress traffic is instead configured with routing rules, the same way as for internal service requests.
1111

@@ -47,7 +47,7 @@ $ oc apply -f gateway.yaml
4747
+
4848
.. Create a YAML file, and copy the following YAML into it.
4949
+
50-
.Virtual service example vs.yaml
50+
.Virtual service example
5151
[source,yaml]
5252
----
5353
apiVersion: networking.istio.io/v1alpha3

0 commit comments

Comments
 (0)