From 6851765b7538953b6c20eadefac2b0576c0de11a Mon Sep 17 00:00:00 2001 From: Patrik Egyed Date: Mon, 2 Aug 2021 10:07:39 +0200 Subject: [PATCH] feat(Cadence): added clusterMetadata configuration --- cadence/templates/server-configmap.yaml | 4 ++ cadence/values.yaml | 59 +++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/cadence/templates/server-configmap.yaml b/cadence/templates/server-configmap.yaml index 1c882fcc..3774c9fc 100644 --- a/cadence/templates/server-configmap.yaml +++ b/cadence/templates/server-configmap.yaml @@ -152,6 +152,9 @@ data: {{- end}} clusterMetadata: + {{- if .Values.server.config.clusterMetadata }} + {{ .Values.server.config.clusterMetadata }} + {{- else }} {{/* Note: backward compatible default behavior for old chart version values.yaml. */}} enableGlobalDomain: {{ `{{ default .Env.ENABLE_GLOBAL_DOMAIN "true" }}` }} failoverVersionIncrement: 10 masterClusterName: "primary" @@ -173,6 +176,7 @@ data: rpcName: "cadence-frontend" rpcAddress: {{ `{{ default .Env.SECONDARY_FRONTEND_SERVICE "cadence-secondary" }}` }}:{{ .Values.server.frontend.service.port | default `{{ default .Env.FRONTEND_PORT 7933 }}` }} {{- end }} + {{- end }} dcRedirectionPolicy: policy: {{ `{{ default .Env.DC_REDIRECT_POLICY "selected-apis-forwarding" }}` }} diff --git a/cadence/values.yaml b/cadence/values.yaml index 2f7f4a7b..29f9d6d1 100644 --- a/cadence/values.yaml +++ b/cadence/values.yaml @@ -57,6 +57,65 @@ server: affinity: {} config: + # clusterMetadata contains the settings of the Cadence clusters + # participating in a Cadence cluster group. + clusterMetadata: + # enableGlobalDomains when set to true allows creating global domains + # which are replicated between all clusters and whose tasks are served by + # the active cluster in the replication. + # + # WARNING: This value **MUST NOT** be changed after launching the Cadence + # cluster group. + enableGlobalDomain: true + + # failoverVersionIncrement is the increment of each cluster version when + # failover happens. + # + # WARNING: For each cluster, (initialFailoverVersion + + # i*failoverVersionIncrement) **MUST** result in a unique value. + failoverVersionIncrement: 10 + + # primaryClusterName is the name of the only cluster which can register + # and update a domain, although each cluster can do domain failover. + # + # WARNING: This value **MUST NOT** be changed after launching the Cadence + # cluster group. + primaryClusterName: "cluster-0" + + # currentClusterName is the name of the current active cluster for the + # global domain. + currentClusterName: "cluster-0" + + # clusterInformation contains the information about each cluster which + # participates in a Cadence cluster group. + # + # WARNING: cluster names and initialFailoverVersion values **MUST** be + # unique. + # + # WARNING: For each cluster, (initialFailoverVersion + + # i*failoverVersionIncrement) **MUST** result in a unique value. + clusterInformation: + cluster-0: + # enabled defines whether the cluster is enabled. + enabled: true + # initialFailoverVersion is the failover version a cluster starts at + # when launched. + # + # WARNING: This value **MUST** be unique and (initialFailoverVersion + # + i*failoverVersionIncrement) **MUST** result in a unique value. + initialFailoverVersion: 0 + # rpcName defines the name of the Cadence frontend remote service to + # use in a Cadence cluster. + rpcName: cadence-frontend + # rpcAddress defines the address (host:port, host can be a DNS name) + # of the Cadence frontend remote service to use in a Cadence cluster. + rpcAddress: cadence:7933 + # cluster-1: + # enabled: true + # initialFailoverVersion: 1 + # rpcName: cadence-frontend + # rpcAddress: cadence-secondary:7933 + logLevel: "debug,info" # IMPORTANT: This value cannot be changed, once it's set.