4.2. 使用 OLM 安装和配置 3scale Operator

使用 Operator Lifecycle Manager(OLM)通过 OCP 控制台中的 OperatorHub 在 OpenShift Container Platform(OCP)4.6 集群上安装 3scale 操作器。您可以使用以下安装模式安装 3scale Operator:

  • 集群范围内的 Operator 在集群中的所有命名空间中可用。
  • 集群中的特定命名空间
注意

如果您在受限网络或断开连接的集群中使用 OpenShift Container Platform,Operator Lifecycle Manager 将不再使用 OperatorHub。按照在 受限网络中标题为"使用 Operator Lifecycle Manager"的指南中设置和使用 OLM 的说明

流程

  1. 在 OpenShift Container Platform 控制台中,使用具有管理员特权的帐户登录。

    注意

    菜单结构取决于您使用的 OpenShift 版本:

  2. Operators > OperatorHub
  3. Filter by keyword 框中,键入 3scale operator 来查找 3scale 运算符。
  4. 点 3scale operator。这时会显示 Operator 信息。
  5. 阅读有关 Operator 的信息,再点 Install。此时会打开 Install Operator 页面。
  6. Install Operator 页面中,在 Update channel 部分选择要更新的频道。
  7. Installation mode 部分中,选择安装 Operator 的位置。

    1. All namespaces on the cluster(default) - operator 在集群的所有命名空间中可用。
    2. A specific namespace on the cluster - operator 只能在您选择的集群的特定单一命名空间中可用。
  8. Subscribe.3scale operator 详情页面会显示,您可以查看 Subscription Overview
  9. 确认订阅升级状态显示为 Up to date
  10. 验证 3scale Operator ClusterServiceVersion(CSV)是否已显示,Operator 的 Status 最终会在您在 创建新 OpenShift 项目中定义的项目中 解析为 InstallSucceeded

    • Operators > Installed Operators。在这种情况下,成功安装将注册 APIManager CRD,以及与 OpenShift API 服务器 中 Operator Capabilities 功能相关的 CRD。
  11. 成功安装后,通过 oc get 查询 CRD 定义的资源类型。

    1. 例如,要验证 APIManager CRD 是否已正确注册,请执行以下命令:

      oc get apimanagers
  12. 您应该看到以下输出:

    No resources found.

除了指定的步骤外,在受限网络中使用 OCP 时,创建一个在 3scale 开发人员门户中使用的允许域的列表。请考虑以下示例:

  • 您打算添加到开发人员门户的任何链接。
  • 通过第三方 SSO 提供程序(如 GitHub)进行 SSO 集成.
  • 计费。
  • 触发外部 URL 的 Webhook。

4.2.1. 在断开连接的环境中的限制

以下列表概述了 3scale 2.12 在断开连接的环境中的当前限制:

  • GitHub 登录 Developer Portal 不可用。
  • 支持链接不可用。
  • 到外部文档的链接无法正常运行。
  • Developer Portal 中的 OpenAPI 规范(OAS)验证器不正常运行,会影响外部服务的链接。
  • ActiveDocs 的产品 概述 页面中,到 OAS 的链接不起作用。

    • 在创建新的 ActiveDocs 规格时,还需要检查 Skip swagger 验证选项。

其他资源