Skip to content

Commit 939218c

Browse files
authored
add support for metrics-job-start-latency-buckets flag in helm (#2450)
Signed-off-by: Manabu McCloskey <manabu.mccloskey@gmail.com>
1 parent fc7c697 commit 939218c

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

charts/spark-operator-chart/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall) for command docum
170170
| prometheus.metrics.portName | string | `"metrics"` | Metrics port name. |
171171
| prometheus.metrics.endpoint | string | `"/metrics"` | Metrics serving endpoint. |
172172
| prometheus.metrics.prefix | string | `""` | Metrics prefix, will be added to all exported metrics. |
173+
| prometheus.metrics.jobStartLatencyBuckets | string | `"30,60,90,120,150,180,210,240,270,300"` | Job Start Latency histogram buckets. Specified in seconds. |
173174
| prometheus.podMonitor.create | bool | `false` | Specifies whether to create pod monitor. Note that prometheus metrics should be enabled as well. |
174175
| prometheus.podMonitor.labels | object | `{}` | Pod monitor labels |
175176
| prometheus.podMonitor.jobLabel | string | `"spark-operator-podmonitor"` | The label to use to retrieve the job name from |

charts/spark-operator-chart/templates/controller/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ spec:
8888
- --metrics-endpoint={{ .Values.prometheus.metrics.endpoint }}
8989
- --metrics-prefix={{ .Values.prometheus.metrics.prefix }}
9090
- --metrics-labels=app_type
91+
- --metrics-job-start-latency-buckets={{ .Values.prometheus.metrics.jobStartLatencyBuckets }}
9192
{{- end }}
9293
{{ if .Values.controller.leaderElection.enable }}
9394
- --leader-election=true

charts/spark-operator-chart/tests/controller/deployment_test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ tests:
214214
portName: test-port
215215
endpoint: /test-endpoint
216216
prefix: test-prefix
217+
jobStartLatencyBuckets: "180,360,420,690"
217218
asserts:
218219
- contains:
219220
path: spec.template.spec.containers[?(@.name=="spark-operator-controller")].args
@@ -230,6 +231,9 @@ tests:
230231
- contains:
231232
path: spec.template.spec.containers[?(@.name=="spark-operator-controller")].args
232233
content: --metrics-labels=app_type
234+
- contains:
235+
path: spec.template.spec.containers[?(@.name=="spark-operator-controller")].args
236+
content: --metrics-job-start-latency-buckets=180,360,420,690
233237

234238
- it: Should enable leader election by default
235239
asserts:

charts/spark-operator-chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ prometheus:
391391
endpoint: /metrics
392392
# -- Metrics prefix, will be added to all exported metrics.
393393
prefix: ""
394+
# -- Job Start Latency histogram buckets. Specified in seconds.
395+
jobStartLatencyBuckets: "30,60,90,120,150,180,210,240,270,300"
394396

395397
# Prometheus pod monitor for controller pods
396398
podMonitor:

0 commit comments

Comments
 (0)