Skip to content

Commit 86bb70a

Browse files
authored
Merge pull request #47204 from dfennessy/THREESCALE-7919
THREESCALE-7919: Added content for the DestinationRule custom resource
2 parents 2e30907 + 77c473c commit 86bb70a

File tree

1 file changed

+62
-14
lines changed

1 file changed

+62
-14
lines changed

modules/ossm-threescale-applying-external-service-entry-objects.adoc

Lines changed: 62 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@
66
[id="ossm-threescale-applying-external-service-entry-objects_{context}"]
77
= Applying 3scale external ServiceEntry objects
88

9-
To have the `threescale-wasm-auth` module authorize requests against 3scale, the module must have access to 3scale services. You can accomplish this within {SMProductName} and Istio by applying an external `ServiceEntry` object.
9+
To have the `threescale-wasm-auth` module authorize requests against 3scale, the module must have access to 3scale services. You can do this within {SMProductName} by applying an external `ServiceEntry` object and a corresponding `DestinationRule` object for TLS configuration to use the HTTPS protocol.
1010

11-
The custom resources set up the service entries for access from within {SMProductShortName} to 3scale Hosted (SaaS) for the backend and system components of the Service Management API and the Account Management API. The Service Management API receives queries for the authorization status of each request. The Account Management API provides API management configuration settings for your services.
11+
The custom resources (CRs) set up the service entries and destination rules for secure access from within {SMProductShortName} to 3scale Hosted (SaaS) for the backend and system components of the Service Management API and the Account Management API. The Service Management API receives queries for the authorization status of each request. The Account Management API provides API management configuration settings for your services.
1212

1313
.Procedure
1414

15-
* Apply the following external `ServiceEntry` custom resources to your cluster:
15+
. Apply the following external `ServiceEntry` CR and related `DestinationRule` CR for 3scale Hosted *backend* to your cluster:
16+
.. Add the `ServiceEntry` CR to a file called `service-entry-threescale-saas-backend.yml`:
1617
+
17-
.Custom resource for 3scale Hosted backend
18+
.ServiceEntry CR
1819
[source,terminal]
1920
----
2021
apiVersion: networking.istio.io/v1beta1
2122
kind: ServiceEntry
2223
metadata:
23-
name: threescale-saas-backend
24+
name: service-entry-threescale-saas-backend
2425
spec:
2526
hosts:
2627
- su1.3scale.net
@@ -31,14 +32,47 @@ spec:
3132
location: MESH_EXTERNAL
3233
resolution: DNS
3334
----
35+
.. Add the `DestinationRule` CR to a file called `destination-rule-threescale-saas-backend.yml`:
3436
+
35-
.Custom resource for 3scale Hosted system
37+
.DestinationRule CR
38+
[source,terminal]
39+
----
40+
apiVersion: networking.istio.io/v1beta1
41+
kind: DestinationRule
42+
metadata:
43+
name: destination-rule-threescale-saas-backend
44+
spec:
45+
host: su1.3scale.net
46+
trafficPolicy:
47+
tls:
48+
mode: SIMPLE
49+
sni: su1.3scale.net
50+
----
51+
52+
.. Apply and save the external `ServiceEntry` CR for the 3scale Hosted backend to your cluster, by running the following command:
53+
+
54+
[source,terminal]
55+
----
56+
$ oc apply -f service-entry-threescale-saas-backend.yml
57+
----
58+
59+
.. Apply and save the external `DestinationRule` CR for the 3scale Hosted backend to your cluster, by running the following command:
60+
+
61+
[source,terminal]
62+
----
63+
$ oc apply -f destination-rule-threescale-saas-backend.yml
64+
----
65+
66+
. Apply the following external `ServiceEntry` CR and related `DestinationRule` CR for 3scale Hosted *system* to your cluster:
67+
.. Add the `ServiceEntry` CR to a file called `service-entry-threescale-saas-system.yml`:
68+
+
69+
.ServiceEntry CR
3670
[source,terminal]
3771
----
3872
apiVersion: networking.istio.io/v1beta1
3973
kind: ServiceEntry
4074
metadata:
41-
name: threescale-saas-system
75+
name: service-entry-threescale-saas-system
4276
spec:
4377
hosts:
4478
- multitenant.3scale.net
@@ -49,25 +83,39 @@ spec:
4983
location: MESH_EXTERNAL
5084
resolution: DNS
5185
----
86+
.. Add the `DestinationRule` CR to a file called `destination-rule-threescale-saas-system.yml`:
5287
+
53-
You can use the `oc apply` command with either of the following methods to apply the objects:
88+
.DestinationRule CR
89+
[source,terminal]
90+
----
91+
apiVersion: networking.istio.io/v1beta1
92+
kind: DestinationRule
93+
metadata:
94+
name: destination-rule-threescale-saas-system
95+
spec:
96+
host: multitenant.3scale.net
97+
trafficPolicy:
98+
tls:
99+
mode: SIMPLE
100+
sni: multitenant.3scale.net
101+
----
54102

55-
** Save the objects to one or more files, and then use the following syntax:
103+
.. Apply and save the external `ServiceEntry` CR for the 3scale Hosted system to your cluster, by running the following command:
56104
+
57105
[source,terminal]
58106
----
59-
$ oc apply -f <filename.yml>
107+
$ oc apply -f service-entry-threescale-saas-system.yml
60108
----
61109

62-
** To apply the objects without first saving them to a file, use the following command:
110+
.. Apply and save the external `DestinationRule` CR for the 3scale Hosted system to your cluster, by running the following command:
63111
+
64112
[source,terminal]
65113
----
66-
$ echo -n "<filename.yml>" | oc apply -f -
114+
$ oc apply -f <destination-rule-threescale-saas-system.yml>
67115
----
68116

69-
Alternatively, you can deploy an in-mesh 3scale service. To do this, change the location of these services in the custom resources.
117+
Alternatively, you can deploy an in-mesh 3scale service. To deploy an in-mesh 3scale service, change the location of the services in the CR by deploying 3scale and linking to the deployment.
70118

71119
[role="_additional-resources"]
72120
.Additional resources
73-
* xref:../../service_mesh/v2x/ossm-traffic-manage.adoc#ossm-routing-service-entries_traffic-management[`ServiceEntry` documentation]
121+
* xref:../../service_mesh/v2x/ossm-traffic-manage.adoc#ossm-routing-service-entries_traffic-management[Service entry and destination rule documentation]

0 commit comments

Comments
 (0)