Skip to content

Commit

Permalink
feat(Cadence): added clusterMetadata configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pregnor committed Aug 2, 2021
1 parent 031c49f commit d4c77e5
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cadence/templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ data:
{{- end}}
clusterMetadata:
{{- if .Values.server.config.clusterMetadata }}
{{- toYaml .Values.server.config.clusterMetadata | nindent 6 }}
{{- else }} {{/* Note: backward compatible default behavior for old chart version values.yaml. */}}
enableGlobalDomain: {{ `{{ default .Env.ENABLE_GLOBAL_DOMAIN "true" }}` }}
failoverVersionIncrement: 10
masterClusterName: "primary"
Expand All @@ -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" }}` }}
Expand Down
59 changes: 59 additions & 0 deletions cadence/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

# masterClusterName 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.
masterClusterName: "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.
Expand Down

0 comments on commit d4c77e5

Please sign in to comment.