Skip to content

Commit

Permalink
fix(Cadence): fixed legacy clusterMetadata default
Browse files Browse the repository at this point in the history
It was broken since chart 0.18.0.

.Values.server.frontend.service.port is required
for the Cadence K8s service in the Helm chart,
thus it will always be defined, so I changed the
defaulting behavior to always use that, because it
would never fall back to the dockerize env var
.Env.FRONTEND_PORT or even back to literal 7933.
  • Loading branch information
pregnor committed Aug 2, 2021
1 parent d4c77e5 commit b312d5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
13 changes: 1 addition & 12 deletions cadence/templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,13 @@ data:
enableGlobalDomain: {{ `{{ default .Env.ENABLE_GLOBAL_DOMAIN "true" }}` }}
failoverVersionIncrement: 10
masterClusterName: "primary"
{{- if `{{ .Env.IS_NOT_PRIMARY }}` }}
currentClusterName: "secondary"
{{- else }}
currentClusterName: "primary"
{{- end }}
clusterInformation:
primary:
enabled: true
initialFailoverVersion: 0
rpcName: "cadence-frontend"
rpcAddress: {{ `{{ default .Env.PRIMARY_FRONTEND_SERVICE "cadence" }}` }}:{{ .Values.server.frontend.service.port | default `{{ default .Env.FRONTEND_PORT 7933 }}` }}
{{- if `{{ .Env.ENABLE_GLOBAL_DOMAIN }}` }}
secondary:
enabled: true
initialFailoverVersion: 2
rpcName: "cadence-frontend"
rpcAddress: {{ `{{ default .Env.SECONDARY_FRONTEND_SERVICE "cadence-secondary" }}` }}:{{ .Values.server.frontend.service.port | default `{{ default .Env.FRONTEND_PORT 7933 }}` }}
{{- end }}
rpcAddress: {{ `{{ default .Env.PRIMARY_FRONTEND_SERVICE "cadence" }}` }}:{{ .Values.server.frontend.service.port }}
{{- end }}
dcRedirectionPolicy:
Expand Down
12 changes: 6 additions & 6 deletions cadence/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ server:
# 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 is the name of the only cluster which can register a
# domain, although each cluster can update domains and do domain failover.
masterClusterName: "cluster-0"

# currentClusterName is the name of the current active cluster for the
# global domain.
#
# WARNING: This value **MUST NOT** be changed manually after launching the
# Cadence cluster group.
currentClusterName: "cluster-0"

# clusterInformation contains the information about each cluster which
Expand All @@ -109,7 +109,7 @@ server:
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
rpcAddress: cadence-frontend:7933
# cluster-1:
# enabled: true
# initialFailoverVersion: 1
Expand Down

0 comments on commit b312d5e

Please sign in to comment.