MART 設定

Apigee Hybrid 管理層通常會透過 Apigee Connect 與執行階段層中的 MART 服務通訊。這是建議的設定。不過,如果您想使用 MART Istio ingress 閘道服務,而非 Apigee Connect,則應將 MART 端點公開給來自叢集外部的請求。MART 端點是安全的 TLS 連線。Hybrid 會使用 Istio 輸入閘道服務,將流量公開至這個端點。

本主題將說明公開 MART 端點的步驟。

新增 MART 服務帳戶

MART 需要 Google Cloud 服務帳戶進行驗證。

  1. 在 Google Cloud 設定步驟「新增服務帳戶」中,您建立了一個沒有 MART 角色的服務帳戶。找出您為該服務帳戶下載的金鑰檔案。檔案的副檔名應為 .json
  2. 將金鑰檔案路徑新增至 mart.serviceAccountPath 屬性:
    ...
    mart:
      sslCertPath:
      sslKeyPath:
      hostAlias:
      serviceAccountPath: "path to a file"
    ...

    例如:

    ...
    mart:
      sslCertPath:
      sslKeyPath:
      hostAlias:
      serviceAccountPath: "your_keypath/mart-service-account.json
    ...

新增 TLS 憑證和主機別名

  1. 開啟覆寫檔案。
  2. 新增 mart.sslCertPathmart.sslKeyPathmart.hostAlias 屬性。下表說明這些屬性:
    屬性
    mart.sslCertPath
    mart.sslKeyPath
    MART 憑證/金鑰組必須經過憑證授權單位 (CA) 授權。如果您先前未建立授權憑證/金鑰組合,則必須立即建立,並輸入對應的屬性值的憑證和金鑰檔案名稱。如需產生授權憑證/金鑰組的相關說明,請參閱「取得 TLS 憑證:範例」。
    mart.hostAlias (必要) MART 伺服器端點的合格 DNS 名稱。例如:foo-mart.mydomain.com

    舉例來說,如果主機別名是合格的網域名稱:

    ...
    
    mart:
      sslCertPath: path-to-file/mart-server.crt
      sslKeyPath: path-to-file/mart-server.key
      hostAlias: foo-mart.mydomain.com
      serviceAccountPath: "your_keypath/mart-service-account.json
    
    ...
    
  3. 儲存變更。