13.6. 用于配置跨站点复制的资源


下表提供了跨站点资源的字段和描述。

Expand
表 13.1. service.type
字段描述

service.type: DataGrid

Data Grid 仅支持通过 Data Grid 服务集群进行跨站点复制。

Expand
表 13.2. service.sites.local
字段描述

service.sites.local.name

将本地站点命名为 Data Grid 集群运行的位置。

service.sites.local.maxRelayNodes

指定可为跨站点复制发送 RELAY 消息的最大 pod 数量。默认值为 1

service.sites.local.discovery.launchGossipRouter

如果为 false,则不会在本地站点中创建跨站点服务和 Gossip 路由器 pod。默认值为 true

service.sites.local.discovery.memory

以字节为单位分配内存量。它使用以下格式 < limit>:<requests&gt; (example "2Gi:1Gi")。

service.sites.local.discovery.cpu

分配 CPU 单元的数量。它使用以下格式 < limit>:<requests&gt; (example "2000m:1000m")。

service.sites.local.expose.type

指定跨站点复制的网络服务。Data Grid 集群使用此服务来通信和执行备份操作。您可以将值设为 NodePortLoadBalancerRoute

service.sites.local.expose.nodePort

如果您通过 NodePort 服务公开 Data Grid,请在默认范围 3000032767 中指定静态端口。如果没有指定端口,则平台会选择一个可用的端口。

service.sites.local.expose.port

如果您通过 LoadBalancer 服务公开 Data Grid,请为该服务指定网络端口。默认端口为 7900

service.sites.local.expose.routeHostName

如果您通过 OpenShift Route 公开 Data Grid,请指定自定义主机名。如果没有设置值,则 OpenShift 会生成一个主机名。

Expand
表 13.3. service.sites.locations
字段描述

service.sites.locations

为所有备份位置提供连接信息。

service.sites.locations.name

指定与 .spec.service.sites.local.name 匹配的备份位置。

service.sites.locations.url

指定用于受管连接的 Kubernetes API 的 URL,或为手动连接指定静态 URL。

使用 openshift:// 为 OpenShift 集群指定 Kubernetes API 的 URL。

请注意,openshift:// URL 必须存在有效的 CA 签名证书。您不能使用自签名证书。

对静态主机名和端口使用 infinispan+xsite://<hostname>:<port > 格式。默认端口为 7900

service.sites.locations.secretName

指定包含备份站点的服务帐户令牌的 secret。

service.sites.locations.clusterName

如果集群名称与本地站点的集群名称不同,请在备份位置指定集群名称。

service.sites.locations.namespace

如果 Data Grid 集群的命名空间与本地站点上的命名空间不匹配,则指定位于备份位置的 Data Grid 集群的命名空间。

受管跨站点连接

spec:
  service:
    type: DataGrid
    sites:
      local:
        name: LON
        expose:
          type: LoadBalancer
        maxRelayNodes: 1
      locations:
      - name: NYC
        clusterName: <nyc_cluster_name>
        namespace: <nyc_cluster_namespace>
        url: openshift://api.site-b.devcluster.openshift.com:6443
        secretName: nyc-token
Copy to Clipboard Toggle word wrap

手动跨站点连接

spec:
  service:
    type: DataGrid
    sites:
      local:
        name: LON
        expose:
          type: LoadBalancer
          port: 65535
        maxRelayNodes: 1
      locations:
      - name: NYC
        url: infinispan+xsite://infinispan-nyc.myhost.com:7900
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat