10.3. 3scale API Management と Service Mesh の接続
ServiceEntry
カスタムリソース (CR) と DestinationRule
CR を、service-mesh/istio-system namespace または info namespace に作成します。これは、ServiceMeshControlPlane を含む namespace に存在する必要があります。
Service Mesh から 3scale にアクセスするには、ServiceEntry
CR および DestinationRule
CR を通じて、テナント URL とバックエンド URL の両方を外部サービスとして設定する必要があります。これにより、threescale-wasm-auth
モジュールは、リクエストの承認を処理するバックエンドと、製品設定が取得されるシステムの両方にアクセスできるようになります。
10.3.1. 3scale API Management URL を Service Mesh に追加する
ServiceEntry
は Service Mesh 内からサービスへのリクエストを許可するために必要であり、DestinationRule
は 3scale サービスの安全な接続を設定するためにあります。
10.3.1.1. テナント URL を Service Mesh に追加する
手順
システムテナント URL を収集します。
- これは、製品の作成に使用した 3scale 管理ポータルの URL です。
システムの
ServiceEntry
を作成します。oc apply -n <info> -f -<<EOF apiVersion: networking.istio.io/v1beta1 kind: ServiceEntry metadata: name: <service_entry_threescale_system> spec: hosts: - <system_hostname> ports: - number: 443 name: https protocol: HTTPS location: MESH_EXTERNAL resolution: DNS EOF
システムの
DestinationRule
を作成します。oc apply -n <info> -f -<<EOF apiVersion: networking.istio.io/v1beta1 kind: DestinationRule metadata: name: <destination_rule_threescale_system> spec: host: <system_hostname> trafficPolicy: tls: mode: SIMPLE sni: <system_hostname> EOF
関連情報