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 e18536f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 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
6 changes: 3 additions & 3 deletions cadence/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ 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.
# masterClusterName is the name of the only cluster which can register a
# domain, although each cluster can update domains and do domain failover.
#
# WARNING: This value **MUST NOT** be changed after launching the Cadence
# cluster group.
Expand Down Expand Up @@ -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 e18536f

Please sign in to comment.