File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
deploy/helm/clickhouse-operator/templates Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ metadata:
12
12
annotations : {{ include "altinity-clickhouse-operator.annotations" . | nindent 4 }}
13
13
spec :
14
14
endpoints :
15
+ {{- if .Values.metrics.enabled }}
15
16
- port : ch-metrics # 8888
16
17
{{- with .Values.serviceMonitor.clickhouseMetrics.interval }}
17
18
interval : {{ . }}
27
28
metricRelabelings :
28
29
{{- toYaml . | nindent 8 }}
29
30
{{- end }}
31
+ {{- end }}
30
32
- port : op-metrics # 9999
31
33
{{- with .Values.serviceMonitor.operatorMetrics.interval }}
32
34
interval : {{ . }}
Original file line number Diff line number Diff line change @@ -178,6 +178,8 @@ function update_service_resource() {
178
178
yq e -i ' .metadata.annotations |= "{{ include \"altinity-clickhouse-operator.annotations\" . | nindent 4 }}"' " ${file} "
179
179
yq e -i ' .spec.selector |= "{{ include \"altinity-clickhouse-operator.selectorLabels\" . | nindent 4 }}"' " ${file} "
180
180
181
+ perl -pi -e ' s/(\s+- port: 8888)/{{ if .Values.metrics.enabled }}\n$1/g' " ${file} "
182
+ perl -pi -e ' s/(name: ch-metrics)/$1\n{{ end }}/g' " ${file} "
181
183
perl -pi -e " s/'//g" " ${file} "
182
184
}
183
185
You can’t perform that action at this time.
0 commit comments