Skip to content

Commit

Permalink
[kube-prometheus-stack] - Allow out_of_order_time_window in Prometheu…
Browse files Browse the repository at this point in the history
…s spec (#2960)

Prometheus >= 2.39.0 adds support for out-of-order samples
by way of an experimental TSDB feature out_of_order_time_window.

This adds support for this feature in the PrometheusSpec used
by the prometheus-operator, noting that it's not available
as an additional arg at this point in time.

Signed-off-by: Marc de Beer <marcdebeer@nine.com.au>
Co-authored-by: Marc de Beer <marcdebeer@nine.com.au>
  • Loading branch information
drogbeer and Marc de Beer committed Mar 27, 2023
1 parent 848f825 commit 4555cc5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 45.7.1
version: 45.8.0
appVersion: v0.63.0
kubeVersion: ">=1.16.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ spec:
{{- if .Values.prometheus.prometheusSpec.retentionSize }}
retentionSize: {{ .Values.prometheus.prometheusSpec.retentionSize | quote }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.tsdb }}
tsdb:
{{- if .Values.prometheus.prometheusSpec.tsdb.outOfOrderTimeWindow }}
outOfOrderTimeWindow: {{ .Values.prometheus.prometheusSpec.tsdb.outOfOrderTimeWindow }}
{{- end }}
{{- end }}
{{- if eq .Values.prometheus.prometheusSpec.walCompression false }}
walCompression: false
{{ else }}
Expand Down
5 changes: 5 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2870,6 +2870,11 @@ prometheus:
##
retentionSize: ""

## Allow out-of-order/out-of-bounds samples ingested into Prometheus for a specified duration
## See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#tsdb
tsdb:
outOfOrderTimeWindow: 0s

## Enable compression of the write-ahead log using Snappy.
##
walCompression: true
Expand Down

0 comments on commit 4555cc5

Please sign in to comment.