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 ecca195
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 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
4 changes: 2 additions & 2 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

0 comments on commit ecca195

Please sign in to comment.