Skip to content

Commit b1153db

Browse files
authored
[Enhancement] Support request param for serviceMonitor (#654)
* [Enhancement] Support request param for serviceMonitor Signed-off-by: zhaohehuhu <luoyedeyi@163.com> * fix indentation Signed-off-by: zhaohehuhu <luoyedeyi@163.com> --------- Signed-off-by: zhaohehuhu <luoyedeyi@163.com>
1 parent 345bf31 commit b1153db

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

helm-charts/charts/kube-starrocks/charts/starrocks/templates/servicemonitor.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ spec:
2525
name: {{ .Values.metrics.serviceMonitor.basicAuth.passwordSecretName }}
2626
key: {{ .Values.metrics.serviceMonitor.basicAuth.passwordSecretKey }}
2727
{{- end }}
28+
{{- if .Values.metrics.serviceMonitor.endpointParam.enabled }}
29+
params:
30+
{{- toYaml .Values.metrics.serviceMonitor.endpointParam.params | nindent 8 }}
31+
{{- end }}
2832
relabelings:
2933
- sourceLabels: [__meta_kubernetes_endpoints_label_app_starrocks_ownerreference_name]
3034
targetLabel: app_starrocks_ownerreference_name
@@ -105,4 +109,4 @@ spec:
105109
app.kubernetes.io/component: cn
106110

107111
{{- end }}
108-
{{- end }}
112+
{{- end }}

helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ metrics:
8686
passwordSecretName: ""
8787
# The key in the secret that contains the password for basic auth.
8888
passwordSecretKey: ""
89+
# Whether to enable request parameters for the ServiceMonitor.
90+
endpointParam:
91+
enabled: false
92+
# the parameters for the ServiceMonitor.
93+
# params:
94+
# with_materialized_view_metrics:
95+
# - "all"
96+
params: {}
8997

9098
# deploy a starrocks cluster
9199
starrocksCluster:

helm-charts/charts/kube-starrocks/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ starrocks:
203203
passwordSecretName: ""
204204
# The key in the secret that contains the password for basic auth.
205205
passwordSecretKey: ""
206+
# Whether to enable request parameters for the ServiceMonitor.
207+
endpointParam:
208+
enabled: false
209+
# the parameters for the ServiceMonitor.
210+
# params:
211+
# with_materialized_view_metrics:
212+
# - "all"
213+
params: {}
206214

207215
# deploy a starrocks cluster
208216
starrocksCluster:

0 commit comments

Comments
 (0)