Skip to content

Commit

Permalink
Add NDC config (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxing1292 authored Dec 9, 2020
1 parent 7a94bb4 commit 2f43193
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 9 deletions.
49 changes: 40 additions & 9 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,67 @@ Source: https://stackoverflow.com/a/52024583/3027614
{{- end }}

{{- define "temporal.frontend.grpcPort" -}}
7233
{{- if $.Values.server.frontend.service.port -}}
{{- $.Values.server.frontend.service.port -}}
{{- else -}}
{{- 7233 -}}
{{- end -}}
{{- end -}}

{{- define "temporal.frontend.membershipPort" -}}
6933
{{- if $.Values.server.frontend.service.membershipPort -}}
{{- $.Values.server.frontend.service.membershipPort -}}
{{- else -}}
{{- 6933 -}}
{{- end -}}
{{- end -}}


{{- define "temporal.history.grpcPort" -}}
7234
{{- if $.Values.server.history.service.port -}}
{{- $.Values.server.history.service.port -}}
{{- else -}}
{{- 7234 -}}
{{- end -}}
{{- end -}}

{{- define "temporal.history.membershipPort" -}}
6934
{{- if $.Values.server.history.service.membershipPort -}}
{{- $.Values.server.history.service.membershipPort -}}
{{- else -}}
{{- 6934 -}}
{{- end -}}
{{- end -}}

{{- define "temporal.matching.grpcPort" -}}
7235
{{- if $.Values.server.matching.service.port -}}
{{- $.Values.server.matching.service.port -}}
{{- else -}}
{{- 7235 -}}
{{- end -}}
{{- end -}}

{{- define "temporal.matching.membershipPort" -}}
6935
{{- if $.Values.server.matching.service.membershipPort -}}
{{- $.Values.server.matching.service.membershipPort -}}
{{- else -}}
{{- 6935 -}}
{{- end -}}
{{- end -}}

{{- define "temporal.worker.grpcPort" -}}
7239
{{- if $.Values.server.worker.service.port -}}
{{- $.Values.server.worker.service.port -}}
{{- else -}}
{{- 7239 -}}
{{- end -}}
{{- end -}}

{{- define "temporal.worker.membershipPort" -}}
6939
{{- if $.Values.server.worker.service.membershipPort -}}
{{- $.Values.server.worker.service.membershipPort -}}
{{- else -}}
{{- 6939 -}}
{{- end -}}
{{- end -}}

{{- define "temporal.persistence.schema" -}}
Expand Down
7 changes: 7 additions & 0 deletions templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ data:
dlq-topic: temporal-visibility-dev-dlq
{{- end }}
{{- if $.Values.server.config.clusterMetadata }}
clusterMetadata:
{{- with .Values.server.config.clusterMetadata }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
clusterMetadata:
enableGlobalDomain: false
failoverVersionIncrement: 10
Expand All @@ -172,6 +178,7 @@ data:
initialFailoverVersion: 1
rpcName: "temporal-frontend"
rpcAddress: "127.0.0.1:7933"
{{- end }}
dcRedirectionPolicy:
policy: "noop"
Expand Down
34 changes: 34 additions & 0 deletions values/values.ndc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
server:
config:
dcRedirectionPolicy:
policy: "selected-apis-forwarding"
toDC: ""

clusterMetadata:
enableGlobalNamespace: true
replicationConsumer:
type: rpc
failoverVersionIncrement: 100
masterClusterName: cluster_a
currentClusterName: # <current cluster name>
# clusterInformation:
# <cluster name>:
# enabled: true
# initialFailoverVersion: <cluster initial failover version>
# rpcName: "frontend"
# rpcAddress: <cluster address:cluster port>
# cluster_a:
# enabled: true
# initialFailoverVersion: 1
# rpcName: "frontend"
# rpcAddress: "localhost:7233"
# cluster_b:
# enabled: true
# initialFailoverVersion: 2
# rpcName: "frontend"
# rpcAddress: "localhost:8233"
# cluster_c:
# enabled: false
# initialFailoverVersion: 3
# rpcName: "frontend"
# rpcAddress: "localhost:9233"

0 comments on commit 2f43193

Please sign in to comment.