Skip to content

Commit 738e821

Browse files
committed
Remove setting metrics config from server.metrics entirely
1 parent 7c0f3a2 commit 738e821

3 files changed

Lines changed: 12 additions & 34 deletions

File tree

charts/temporal/templates/server-configmap.yaml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,12 @@ data:
3838
metrics:
3939
tags:
4040
type: {{ `{{ env "TEMPORAL_SERVICES" | quote }}` }}
41-
{{- with (merge $server.config.metrics.tags $server.metrics.tags) }}
41+
{{- with $server.config.metrics.tags }}
4242
{{- toYaml . | nindent 10 }}
4343
{{- end }}
44-
{{- with $server.metrics.excludeTags }}
45-
excludeTags:
46-
{{- toYaml . | nindent 10 }}
47-
{{- end }}
48-
{{- with $server.metrics.prefix }}
49-
prefix: "{{- . }}"
50-
{{- end }}
51-
{{- with (omit $server.config.metrics "tags" "prometheus") }}
44+
{{- with (omit $server.config.metrics "tags") }}
5245
{{- toYaml . | nindent 8 }}
5346
{{- end }}
54-
{{- with $server.config.prometheus }}
55-
prometheus:
56-
{{- toYaml . | nindent 10 }}
57-
{{- else }}
58-
prometheus:
59-
{{- toYaml $server.config.metrics.prometheus | nindent 10 }}
60-
{{- end }}
6147
6248
{{- with $server.config.tls }}
6349
tls:

charts/temporal/tests/server_configmap_test.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ tests:
135135
path: data['config_template.yaml']
136136
pattern: 'password: \{\{ env "TEMPORAL_VISIBILITY_STORE_PASSWORD" \| quote \}\}'
137137

138-
- it: handles metrics correctly with backwards compatibility
138+
- it: handles metrics config
139139
set:
140140
server:
141141
config:
@@ -153,12 +153,9 @@ tests:
153153
prefix: "temporal_"
154154
tags:
155155
env: production
156+
excludeTags:
157+
ignored: ["tag1", "tag2"]
156158
withoutUnitSuffix: false
157-
metrics:
158-
tags:
159-
region: us-west-2
160-
excludeTags:
161-
ignored: ["tag1", "tag2"]
162159
template: templates/server-configmap.yaml
163160
documentSelector:
164161
path: metadata.name
@@ -175,7 +172,7 @@ tests:
175172
pattern: "env: production"
176173
- matchRegex:
177174
path: data['config_template.yaml']
178-
pattern: "region: us-west-2"
175+
pattern: "withoutUnitSuffix: false"
179176
- matchRegex:
180177
path: data['config_template.yaml']
181-
pattern: "withoutUnitSuffix: false"
178+
pattern: "prometheus:\\s+listenAddress: 0.0.0.0:9090"

charts/temporal/values.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ server:
3333
# prometheus.io/scrape
3434
annotations:
3535
enabled: true
36-
# Additional tags to be added to Prometheus metrics. Deprecated, set server.config.metrics.tags.
37-
tags: {}
38-
# Tags to be excluded in Prometheus metrics. Deprecated, set server.config.metrics.excludeTags.
39-
excludeTags: {}
40-
# Deprecated, set server.config.metrics.prefix.
41-
prefix:
4236
# Enable Prometheus ServiceMonitor
4337
# Use this if you installed the Prometheus Operator (https://github.com/coreos/prometheus-operator).
4438
serviceMonitor:
@@ -67,8 +61,6 @@ server:
6761
# sourceLabels:
6862
# - __name__
6963
# targetLabel: __name__
70-
prometheus:
71-
timerType: histogram
7264
deploymentLabels: {}
7365
deploymentAnnotations: {}
7466
deploymentStrategy: {}
@@ -226,9 +218,12 @@ server:
226218
# Additional tags to be added to Prometheus metrics
227219
tags: {}
228220
# ... All other fields from https://github.com/temporalio/temporal/blob/main/common/metrics/config.go
221+
# excludeTags: {}
222+
# prefix: ""
223+
# etc.
229224
prometheus:
230-
timerType: histogram
231-
listenAddress: "0.0.0.0:9090"
225+
timerType: histogram
226+
listenAddress: "0.0.0.0:9090"
232227
namespaces:
233228
# Enable this to create namespaces
234229
create: false

0 commit comments

Comments
 (0)