Skip to content

Commit 98e99fc

Browse files
committed
6894-3scaleIstioAdapterUpdates: Added updates for the procedure to configure the integration setting in 3scale
1 parent 8cdf5c7 commit 98e99fc

8 files changed

+67
-28
lines changed

modules/ossm-cr-example.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// * service_mesh/v2x/customizing-installation-ossm.adoc
44

55
[id="ossm-cr-example_{context}"]
6-
= Control plane parameters
6+
= Control plane parameters
77

88
The following table lists the top-level parameters for the `ServiceMeshControlPlane` resource.
99

@@ -187,9 +187,9 @@ spec:
187187
some-other-egress-gateway: {}
188188
189189
policy:
190-
type: Istiod # or Mixer
190+
type: Mixer
191191
mixer: # only applies if policy.type: Mixer
192-
enableChecks: false
192+
enableChecks: true
193193
failOpen: false
194194
195195
telemetry:

modules/ossm-mixer-policy-1x.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ In previous versions of {ProductName}, Mixer’s policy enforcement was enabled
1010
.Prerequisites
1111
* Access to the {product-title} Command-line Interface (CLI) also known as `oc`.
1212

13+
NOTE: The examples use <istio-system> as the control plane namespace. Replace this value with the namespace where you deployed the Service Mesh Control Plane (SMCP).
1314

1415
.Procedure
1516

@@ -19,14 +20,14 @@ In previous versions of {ProductName}, Mixer’s policy enforcement was enabled
1920
+
2021
[source,terminal]
2122
----
22-
$ oc get cm -n istio-system istio -o jsonpath='{.data.mesh}' | grep disablePolicyChecks
23+
$ oc get cm -n <istio-system> istio -o jsonpath='{.data.mesh}' | grep disablePolicyChecks
2324
----
2425

2526
. If `disablePolicyChecks: true`, edit the {ProductShortName} ConfigMap:
2627
+
2728
[source,terminal]
2829
----
29-
$ oc edit cm -n istio-system istio
30+
$ oc edit cm -n <istio-system> istio
3031
----
3132

3233
. Locate `disablePolicyChecks: true` within the ConfigMap and change the value to `false`.

modules/ossm-mixer-policy.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ In previous versions of {ProductName}, Mixer’s policy enforcement was enabled
1010
.Prerequisites
1111
* Access to the {product-title} Command-line Interface (CLI) also known as `oc`.
1212

13+
NOTE: The examples use <istio-system> as the control plane namespace. Replace this value with the namespace where you deployed the Service Mesh Control Plane (SMCP).
1314

1415
.Procedure
1516

@@ -19,14 +20,14 @@ In previous versions of {ProductName}, Mixer’s policy enforcement was enabled
1920
+
2021
[source,terminal]
2122
----
22-
$ oc get cm -n istio-system istio -o jsonpath='{.data.mesh}' | grep disablePolicyChecks
23+
$ oc get cm -n <istio-system> istio -o jsonpath='{.data.mesh}' | grep disablePolicyChecks
2324
----
2425

2526
. If `disablePolicyChecks: true`, edit the {ProductShortName} ConfigMap:
2627
+
2728
[source,terminal]
2829
----
29-
$ oc edit cm -n istio-system istio
30+
$ oc edit cm -n <istio-system> istio
3031
----
3132

3233
. Locate `disablePolicyChecks: true` within the ConfigMap and change the value to `false`.

modules/ossm-threescale-integrate-1x.adoc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ To configure the 3scale Istio Adapter, refer to {ProductName} custom resources f
2424

2525
[NOTE]
2626
====
27-
Pay particular attention to the `kind: handler` resource. You must update this with your 3scale credentials and the service ID of the API you want to manage.
27+
Pay particular attention to the `kind: handler` resource. You must update this with your 3scale account credentials. You can optionally add a `service_id` to a handler, but this is kept for backwards compatibility only, since it would render the handler only useful for one service in your 3scale account. If you add `service_id` to a handler, enabling 3scale for other services requires you to create more handlers with different `service_ids`.
2828
====
2929

30-
. Modify the handler configuration with your 3scale configuration.
30+
Use a single handler per 3scale account by following the steps below:
31+
32+
.Procedure
33+
34+
. Create a handler for your 3scale account and specify your account credentials. Omit any service identifier.
3135
+
32-
.Handler configuration example
3336
[source,yaml]
3437
----
3538
apiVersion: "config.istio.io/v1alpha2"
@@ -39,15 +42,18 @@ Pay particular attention to the `kind: handler` resource. You must update this w
3942
spec:
4043
adapter: threescale
4144
params:
42-
service_id: "<SERVICE_ID>"
4345
system_url: "https://<organization>-admin.3scale.net/"
4446
access_token: "<ACCESS_TOKEN>"
4547
connection:
4648
address: "threescale-istio-adapter:3333"
4749
----
48-
50+
+
4951
Optionally, you can provide a `backend_url` field within the _params_ section to override the URL provided by the 3scale configuration. This may be useful if the adapter runs on the same cluster as the 3scale on-premise instance, and you wish to leverage the internal cluster DNS.
50-
52+
+
53+
. Edit or patch the Deployment resource of any services belonging to your 3scale account as follows:
54+
.. Add the `"service-mesh.3scale.net/service-id"` label with a value corresponding to a valid `service_id`.
55+
.. Add the `"service-mesh.3scale.net/credentials"` label with its value being the _name of the handler resource_ from step 1.
56+
. Do step 2 to link it to your 3scale account credentials and to its service identifier, whenever you intend to add more services.
5157
. Modify the rule configuration with your 3scale configuration to dispatch the rule to the threescale handler.
5258
+
5359
.Rule configuration example

modules/ossm-threescale-integrate.adoc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ To configure the 3scale Istio Adapter, refer to {ProductName} custom resources f
2727

2828
[NOTE]
2929
====
30-
Pay particular attention to the `kind: handler` resource. You must update this with your 3scale credentials and the service ID of the API you want to manage.
30+
Pay particular attention to the `kind: handler` resource. You must update this with your 3scale account credentials. You can optionally add a `service_id` to a handler, but this is kept for backwards compatibility only, since it would render the handler only useful for one service in your 3scale account. If you add `service_id` to a handler, enabling 3scale for other services requires you to create more handlers with different `service_ids`.
3131
====
3232

33-
. Modify the handler configuration with your 3scale configuration.
33+
Use a single handler per 3scale account by following the steps below:
34+
35+
.Procedure
36+
37+
. Create a handler for your 3scale account and specify your account credentials. Omit any service identifier.
3438
+
35-
.Handler configuration example
3639
[source,yaml]
3740
----
3841
apiVersion: "config.istio.io/v1alpha2"
@@ -42,15 +45,18 @@ Pay particular attention to the `kind: handler` resource. You must update this w
4245
spec:
4346
adapter: threescale
4447
params:
45-
service_id: "<SERVICE_ID>"
4648
system_url: "https://<organization>-admin.3scale.net/"
4749
access_token: "<ACCESS_TOKEN>"
4850
connection:
4951
address: "threescale-istio-adapter:3333"
5052
----
51-
53+
+
5254
Optionally, you can provide a `backend_url` field within the _params_ section to override the URL provided by the 3scale configuration. This may be useful if the adapter runs on the same cluster as the 3scale on-premise instance, and you wish to leverage the internal cluster DNS.
53-
55+
+
56+
. Edit or patch the Deployment resource of any services belonging to your 3scale account as follows:
57+
.. Add the `"service-mesh.3scale.net/service-id"` label with a value corresponding to a valid `service_id`.
58+
.. Add the `"service-mesh.3scale.net/credentials"` label with its value being the _name of the handler resource_ from step 1.
59+
. Do step 2 to link it to your 3scale account credentials and to its service identifier, whenever you intend to add more services.
5460
. Modify the rule configuration with your 3scale configuration to dispatch the rule to the threescale handler.
5561
+
5662
.Rule configuration example

modules/ossm-threescale-integration-settings.adoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ For 3scale SaaS customers, {ProductName} is enabled as part of the Early Access
1515

1616
.Procedure
1717

18-
. Navigate to *[your_API_name]* -> *Integration* -> *Configuration*.
18+
. Navigate to *[your_API_name]* -> *Integration*
1919

20-
. At the top of the *Integration* page click on *edit integration settings* in the top right corner.
20+
. Click *Settings*.
2121

22-
. Under the *Service Mesh* heading, click the *Istio* option.
22+
. Select the *Istio* option under _Deployment_.
23+
+
24+
* The *API Key (user_key)* option under _Authentication_ is selected by default.
2325

24-
. Scroll to the bottom of the page and click *Update Service*.
26+
. Click *Update Product* to save your selection.
27+
28+
. Click *Configuration*.
29+
30+
. Click *Update Configuration*.

modules/ossm-threescale-manifests.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
[id="ossm-threescale-manifests_{context}"]
77
= Generating manifests from a deployed adapter
88

9+
[NOTE]
10+
====
11+
* `NAME` is an identifier you use to identify with the service you are managing with 3scale.
12+
* The `CREDENTIALS_NAME` reference is an identifier that corresponds to the `match` section in the rule configuration. This is automatically set to the `NAME` identifier if you are using the CLI tool.
13+
* Its value does not need to be anything specific: the label value should just match the contents of the rule. See link:https://github.com/3scale/3scale-istio-adapter/blob/v2.X/README.md#routing-service-traffic-through-the-adapter[Routing service traffic through the adapter] for more information.
14+
====
915

1016
. Run this command to generate manifests from a deployed adapter in the `istio-system` namespace:
1117
+

modules/ossm-threescale-templates.adoc

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,27 @@
66
[id="ossm-threescale-templates_{context}"]
77
= Generate templates from URL examples
88

9-
* This example generates templates allowing the token, URL pair to be shared by multiple services as a single handler:
9+
[NOTE]
10+
====
11+
* Run the following commands via `oc exec` from the 3scale adapter container image in xref:ossm-threescale-manifests_{context}[Generating manifests from a deployed adapter].
12+
* Use the `3scale-config-gen` command to help avoid YAML syntax and indentation errors.
13+
* You can omit the `--service` if you use the annotations.
14+
* This command must be invoked from within the container image via `oc exec`.
15+
====
16+
17+
.Procedure
18+
19+
* Use the `3scale-config-gen` command to autogenerate templates files allowing the token, URL pair to be shared by multiple services as a single handler:
1020
+
1121
----
12-
$ 3scale-gen-config --name=admin-credentials --url="https://<organization>-admin.3scale.net:443" --token="[redacted]"
22+
$ 3scale-config-gen --name=admin-credentials --url="https://<organization>-admin.3scale.net:443" --token="[redacted]"
1323
----
14-
15-
* This example generates the templates with the service ID embedded in the handler:
24+
+
25+
* The following example generates the templates with the service ID embedded in the handler:
1626
+
1727
----
18-
$ 3scale-gen-config --url="https://<organization>-admin.3scale.net" --name="my-unique-id" --service="123456789" --token="[redacted]"
28+
$ 3scale-config-gen --url="https://<organization>-admin.3scale.net" --name="my-unique-id" --service="123456789" --token="[redacted]"
1929
----
30+
31+
.Additional resources
32+
* link:https://access.redhat.com/documentation/en-us/red_hat_3scale_api_management/2.10/html-single/admin_portal_guide/index#tokens[Tokens].

0 commit comments

Comments
 (0)