forked from temporalio/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver-configmap.yaml
191 lines (173 loc) · 7.73 KB
/
server-configmap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{{- if $.Values.server.enabled }}
{{- range $service := (list "frontend" "history" "matching" "worker") }}
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ include "temporal.componentname" (list $ $service) }}-config"
labels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
helm.sh/chart: {{ include "temporal.chart" $ }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/version: {{ $.Chart.AppVersion | replace "+" "_" }}
app.kubernetes.io/part-of: {{ $.Chart.Name }}
data:
config_template.yaml: |-
log:
stdout: true
level: {{ $.Values.server.config.logLevel | quote }}
persistence:
defaultStore: {{ $.Values.server.config.persistence.defaultStore }}
visibilityStore: visibility
{{- if or $.Values.elasticsearch.enabled $.Values.elasticsearch.external }}
advancedVisibilityStore: es-visibility
{{- end }}
numHistoryShards: {{ $.Values.server.config.numHistoryShards }}
datastores:
{{- with $.Values.server.config.persistence.additionalStores }}
{{- toYaml . | nindent 8 }}
{{- end }}
default:
{{- if eq (include "temporal.persistence.driver" (list $ "default")) "cassandra" }}
cassandra:
hosts: "{{ include "temporal.persistence.cassandra.hosts" (list $ "default") }}"
port: {{ include "temporal.persistence.cassandra.port" (list $ "default") }}
password: "{{ `{{ .Env.TEMPORAL_STORE_PASSWORD }}` }}"
{{- with (omit $.Values.server.config.persistence.default.cassandra "hosts" "port" "password" "existingSecret") }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if $.Values.server.config.persistence.faultinjection}}
{{- if $.Values.server.config.persistence.faultinjection.rate }}
faultInjection:
rate: {{ $.Values.server.config.persistence.faultinjection.rate }}
{{- end }}
{{- end }}
{{- if eq (include "temporal.persistence.driver" (list $ "default")) "sql" }}
sql:
pluginName: "{{ include "temporal.persistence.sql.driver" (list $ "default") }}"
driverName: "{{ include "temporal.persistence.sql.driver" (list $ "default") }}"
databaseName: "{{ $.Values.server.config.persistence.default.sql.database }}"
connectAddr: "{{ include "temporal.persistence.sql.host" (list $ "default") }}:{{ include "temporal.persistence.sql.port" (list $ "default") }}"
connectProtocol: "tcp"
user: {{ include "temporal.persistence.sql.user" (list $ "default") }}
password: "{{ `{{ .Env.TEMPORAL_STORE_PASSWORD }}` }}"
{{- with (omit $.Values.server.config.persistence.default.sql "driver" "driverName" "host" "port" "connectAddr" "connectProtocol" "database" "databaseName" "user" "password" "existingSecret") }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
visibility:
{{- if eq (include "temporal.persistence.driver" (list $ "visibility")) "cassandra" }}
cassandra:
hosts: "{{ include "temporal.persistence.cassandra.hosts" (list $ "visibility") }}"
port: {{ include "temporal.persistence.cassandra.port" (list $ "visibility") }}
password: "{{ `{{ .Env.TEMPORAL_VISIBILITY_STORE_PASSWORD }}` }}"
{{- with (omit $.Values.server.config.persistence.visibility.cassandra "hosts" "port" "password" "existingSecret") }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if eq (include "temporal.persistence.driver" (list $ "default")) "sql" }}
sql:
pluginName: "{{ include "temporal.persistence.sql.driver" (list $ "visibility") }}"
driverName: "{{ include "temporal.persistence.sql.driver" (list $ "visibility") }}"
databaseName: "{{ $.Values.server.config.persistence.visibility.sql.database }}"
connectAddr: "{{ include "temporal.persistence.sql.host" (list $ "visibility") }}:{{ include "temporal.persistence.sql.port" (list $ "visibility") }}"
connectProtocol: "tcp"
user: "{{ include "temporal.persistence.sql.user" (list $ "visibility") }}"
password: "{{ `{{ .Env.TEMPORAL_VISIBILITY_STORE_PASSWORD }}` }}"
{{- with (omit $.Values.server.config.persistence.visibility.sql "driver" "driverName" "host" "port" "connectAddr" "connectProtocol" "database" "databaseName" "user" "password" "existingSecret") }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if or $.Values.elasticsearch.enabled $.Values.elasticsearch.external }}
es-visibility:
elasticsearch:
version: "{{ $.Values.elasticsearch.version }}"
url:
scheme: "{{ $.Values.elasticsearch.scheme }}"
host: "{{ $.Values.elasticsearch.host }}:{{ $.Values.elasticsearch.port }}"
username: "{{ $.Values.elasticsearch.username }}"
password: "{{ $.Values.elasticsearch.password }}"
logLevel: "{{ $.Values.elasticsearch.logLevel }}"
indices:
visibility: "{{ $.Values.elasticsearch.visibilityIndex }}"
{{- end }}
global:
membership:
name: temporal
maxJoinDuration: 30s
broadcastAddress: {{ `{{ default .Env.POD_IP "0.0.0.0" }}` }}
pprof:
port: 7936
metrics:
tags:
type: {{ $service }}
prometheus:
timerType: histogram
listenAddress: "0.0.0.0:9090"
services:
frontend:
rpc:
grpcPort: {{ include "temporal.frontend.grpcPort" $ }}
membershipPort: {{ include "temporal.frontend.membershipPort" $ }}
bindOnIP: "0.0.0.0"
history:
rpc:
grpcPort: {{ include "temporal.history.grpcPort" $ }}
membershipPort: {{ include "temporal.history.membershipPort" $ }}
bindOnIP: "0.0.0.0"
matching:
rpc:
grpcPort: {{ include "temporal.matching.grpcPort" $ }}
membershipPort: {{ include "temporal.matching.membershipPort" $ }}
bindOnIP: "0.0.0.0"
worker:
rpc:
grpcPort: {{ include "temporal.worker.grpcPort" $ }}
membershipPort: {{ include "temporal.worker.membershipPort" $ }}
bindOnIP: "0.0.0.0"
{{- if $.Values.server.config.clusterMetadata }}
clusterMetadata:
{{- with $.Values.server.config.clusterMetadata }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
clusterMetadata:
enableGlobalDomain: false
failoverVersionIncrement: 10
masterClusterName: "active"
currentClusterName: "active"
clusterInformation:
active:
enabled: true
initialFailoverVersion: 1
rpcName: "temporal-frontend"
rpcAddress: "127.0.0.1:7933"
{{- end }}
dcRedirectionPolicy:
policy: "noop"
toDC: ""
{{- if $.Values.server.archival }}
archival:
{{- with $.Values.server.archival }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- else }}
archival:
status: "disabled"
{{- end }}
{{- if $.Values.server.namespaceDefaults }}
namespaceDefaults:
{{- with $.Values.server.namespaceDefaults }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- else }}
{{- end }}
publicClient:
hostPort: "{{ include "temporal.componentname" (list $ "frontend") }}:{{ $.Values.server.frontend.service.port }}"
dynamicConfigClient:
filepath: "/etc/temporal/dynamic_config/dynamic_config.yaml"
pollInterval: "10s"
---
{{- end }}
{{- end }}