2.4. 配置 Fuse Online pod


您可以通过在 Fuse Online 自定义资源中设置节点关联性和容限选项,配置 Fuse Online 基础架构组件和集成 pod 放置到 OpenShift 集群的节点上。nodeAffinity 选项允许您指定 Fuse Online pod 的关联性和要放置的一组节点。tolerations 选项允许您控制在哪些节点上运行 Fuse Online pod 的节点,并防止其他工作负载使用这些节点。

您可以通过在安装 Fuse Online 之前或安装后编辑 Fuse Online 自定义资源来设置这些选项。

您可以指定与集成部署分开的基础架构组件部署配置节点关联性或容限设置:

  • infraScheduling - 指定 infraScheduling 选项,为这些 Fuse 在线基础架构部署配置节点关联性和容限设置:

    • syndesis-db
    • syndesis-meta
    • syndesis-prometheus
    • syndesis-ui

      syndsis-operator 部署不受节点关联性或容限更改的影响,因为它是 Fuse 在线管理组件。

  • integrationScheduling - 指定 integrationScheduling 选项,为所有 Fuse 在线集成部署配置节点关联性和容限设置。

    注意 :如果要知道 Fuse Online 部署是否为集成部署,请检查部署名称。您可以使用 oc get pods 命令来查看正在运行的部署列表。如果部署名称包含 -i 前缀,它是一个集成部署,例如 i-my-integration

以下流程描述了如何使用 oc patch 命令编辑自定义资源。另外,您可以按照这些主题中所述编辑自定义资源:

先决条件

  • Fuse Online 已安装在 OCP on-site.
  • 已安装 oc 客户端工具,它连接到安装了 Fuse Online 的 OCP 集群。

流程

  1. 使用 oc patch 命令,并使用以下语法配置 容限 设置。为 Fuse Online infrastructure 组件部署指定 infra Scheduling,或为 Fuse Online 集成 部署指定 IntegrationScheduling:

    oc patch syndesis/app --type=merge -p '{"spec":{"infraScheduling"|"infraScheduling":{"tolerations":[{"key":"_value1_","operator":"_value2_","effect":"_value3_"},{"key":"_value4_","operator":"_value5_","effect":"_value6_"}]}}}'
    Copy to Clipboard Toggle word wrap

    例如,以下命令为 Fuse 在线基础架构组件添加了容限:

    oc patch syndesis/app --type=merge -p '{"spec":{"infraScheduling":{"tolerations":[{"key":"tol_1","operator":"Equal","effect":"NoSchedule"},{"key":"tol_2","operator":"Equal","value":"value2","effect":"NoSchedule"}]}}}'
    Copy to Clipboard Toggle word wrap
  2. 使用带有以下语法的 oc patch 命令配置 节点关联性 设置。为 Fuse Online infrastructure 组件部署指定 infra Scheduling,或为 Fuse Online 集成 部署指定 IntegrationScheduling:

     oc patch syndesis/app --type=merge  -p '{"spec":{"infraScheduling"|"infraScheduling":{"affinity":{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"weight":_value1_,"preference":{"matchExpressions":[{"key":"_value1_","operator":"_value2_","values":["_value3_","_value4_"]}]}}]}}}'
    Copy to Clipboard Toggle word wrap

    例如,以下命令将 nodeAffinity 设置为 Fuse Online 基础架构组件和集成:

     oc patch syndesis/app --type=merge  -p '{"spec":{"infraScheduling":{"affinity":{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"weight":11,"preference":{"matchExpressions":[{"key":"_affinity","operator":"In","values":["foo","bar"]}]}}]}}},"integrationScheduling":{"affinity":{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"weight":22,"preference":{"matchExpressions":[{"key":"my_affinity2","operator":"In","values":["foo","bar"]}]}}]}}}}}'
    Copy to Clipboard Toggle word wrap
  3. 要删除配置设置,请在 oc patch 命令中使用 remove 选项,如下例所示:

    • 以下示例命令从 Fuse 在线集成中的 nodeAffinity 中删除 preferredDuringSchedulingIgnoredDuringExecution 设置:

      oc patch syndesis/app --type=json -p '[{"op": "remove", "path": "/spec/integrationScheduling/affinity/nodeAffinity/preferredDuringSchedulingIgnoredDuringExecution" }]'
      Copy to Clipboard Toggle word wrap
    • 以下示例从 Fuse Online 基础架构组件中删除容限:

      oc patch syndesis/app --type=json -p '[{"op": "remove", "path": "/spec/infraScheduling/tolerations" }]'
      Copy to Clipboard Toggle word wrap

其他资源

如需有关容限和节点关联性的信息,请参阅了解节点关联性以及使用 OpenShift 文档中的 节点污点部分控制 pod 放置

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat