multi-cluster

Manifests #

cluster-a.yaml #

apiVersion: temporal.bmor10.com/v1alpha1
kind: TemporalCluster
metadata:
  name: cluster-a
spec:
  version: 1.31.1
  numHistoryShards: 512
  clusterMetadata:
    enableGlobalNamespace: true
    failoverVersionIncrement: 100
    currentClusterName: "clusterA"
    initialFailoverVersion: 1
    masterClusterName: "clusterA"
  mtls:
    provider: cert-manager
    issuerRef:
      name: shared-ca-issuer
      kind: ClusterIssuer
    frontend:
      dnsNames:
        - "cluster-a.example.com"
  persistence:
    defaultStore:
      sql:
        pluginName: postgres12
        host: postgres.default.svc
        port: 5432
        database: temporal
        user: temporal
        passwordSecretRef:
          name: temporal-pg
          key: password
    visibilityStore:
      sql:
        pluginName: postgres12
        host: postgres.default.svc
        port: 5432
        database: temporal_visibility
        user: temporal
        passwordSecretRef:
          name: temporal-pg
          key: password

cluster-b.yaml #

apiVersion: temporal.bmor10.com/v1alpha1
kind: TemporalCluster
metadata:
  name: cluster-b
spec:
  version: 1.31.1
  numHistoryShards: 512
  clusterMetadata:
    enableGlobalNamespace: true
    failoverVersionIncrement: 100
    currentClusterName: "clusterB"
    initialFailoverVersion: 2
    masterClusterName: "clusterA"
  mtls:
    provider: cert-manager
    issuerRef:
      name: shared-ca-issuer
      kind: ClusterIssuer
    frontend:
      dnsNames:
        - "cluster-b.example.com"
  persistence:
    defaultStore:
      sql:
        pluginName: postgres12
        host: postgres.default.svc
        port: 5432
        database: temporal
        user: temporal
        passwordSecretRef:
          name: temporal-pg
          key: password
    visibilityStore:
      sql:
        pluginName: postgres12
        host: postgres.default.svc
        port: 5432
        database: temporal_visibility
        user: temporal
        passwordSecretRef:
          name: temporal-pg
          key: password

cluster-connection.yaml #

apiVersion: temporal.bmor10.com/v1alpha1
kind: TemporalClusterConnection
metadata:
  name: dr-pair
spec:
  peers:
    - name: clusterA
      clusterRef:
        name: cluster-a
    - name: clusterB
      clusterRef:
        name: cluster-b

global-namespace.yaml #

apiVersion: temporal.bmor10.com/v1alpha1
kind: TemporalNamespace
metadata:
  name: my-global-ns
spec:
  clusterRef:
    name: cluster-a
  isGlobal: true
  clusters: [clusterA, clusterB]
  activeCluster: clusterA
  retentionPeriod: 72h