11.5. Service Mesh と同じクラスターで 3scale を使用する
次の手順は、Service Mesh へのバックエンド URL の追加 の代替手順です。
threescale-wasm-auth module
に 3scale に対するリクエストを承認させるには、モジュールが 3scale サービスにアクセスできる必要があります。これを Red Hat OpenShift Service Mesh 内で行うには、外部 ServiceEntry
オブジェクトと、HTTPS プロトコルを使用する TLS 設定の対応する DestinationRule
オブジェクトを適用します。
カスタムリソース (CR) は、Service Management API および Account Management API のバックエンドおよびシステムコンポーネントに対して、Service Mesh 内から 3scale への安全なアクセスのためのサービスエントリーと宛先ルールをセットアップします。Service Management API は、各リクエストの承認ステータスのクエリーを受信します。Account Management API は、サービスの API 管理設定を提供します。
手順
バックエンドの
ServiceEntry
を作成します。oc apply -n <info> -f -<<EOF apiVersion: networking.istio.io/v1beta1 kind: ServiceEntry metadata: name: <service_entry_threescale_backend> spec: hosts: - backend-listener.<3scale_namespace>.svc.cluster.local ports: - number: 80 name: http protocol: HTTP 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_backend> spec: host: backend-listener.<3scale_namespace>.svc.cluster.local EOF