Skip to content

Commit c6c8375

Browse files
BreeeQuentinBisson
andauthored
[kube-prometheus-stack] feature(kubelet): Add trackTimestampsStaleness (#5050)
* feat(kubelet): Add trackTimestampsStaleness Signed-off-by: Breee <[email protected]> * Update charts/kube-prometheus-stack/values.yaml Signed-off-by: Quentin Bisson <[email protected]> * Update charts/kube-prometheus-stack/Chart.yaml Signed-off-by: Quentin Bisson <[email protected]> --------- Signed-off-by: Breee <[email protected]> Signed-off-by: Quentin Bisson <[email protected]> Co-authored-by: Quentin Bisson <[email protected]>
1 parent f890772 commit c6c8375

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

charts/kube-prometheus-stack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ name: kube-prometheus-stack
2323
sources:
2424
- https://github.com/prometheus-community/helm-charts
2525
- https://github.com/prometheus-operator/kube-prometheus
26-
version: 66.3.1
26+
version: 66.4.0
2727
appVersion: v0.78.2
2828
kubeVersion: ">=1.19.0-0"
2929
home: https://github.com/prometheus-operator/kube-prometheus

charts/kube-prometheus-stack/templates/exporters/kubelet/servicemonitor.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ spec:
6262
{{- end }}
6363
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
6464
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
65+
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
6566
tlsConfig:
6667
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
6768
insecureSkipVerify: true
@@ -118,6 +119,7 @@ spec:
118119
{{- end }}
119120
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
120121
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
122+
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
121123
tlsConfig:
122124
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
123125
insecureSkipVerify: true
@@ -144,6 +146,7 @@ spec:
144146
{{- end }}
145147
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
146148
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
149+
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
147150
{{- if .Values.kubelet.serviceMonitor.metricRelabelings }}
148151
metricRelabelings:
149152
{{ tpl (toYaml .Values.kubelet.serviceMonitor.metricRelabelings | indent 4) . }}
@@ -166,6 +169,7 @@ spec:
166169
{{- end }}
167170
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
168171
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
172+
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
169173
{{- if .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings }}
170174
metricRelabelings:
171175
{{ tpl (toYaml .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings | indent 4) . }}
@@ -211,6 +215,7 @@ spec:
211215
{{- end }}
212216
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
213217
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
218+
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
214219
{{- if .Values.kubelet.serviceMonitor.resourceMetricRelabelings }}
215220
metricRelabelings:
216221
{{ tpl (toYaml .Values.kubelet.serviceMonitor.resourceMetricRelabelings | indent 4) . }}

charts/kube-prometheus-stack/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,11 @@ kubelet:
13221322
##
13231323
honorTimestamps: true
13241324

1325+
## If true, defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data. Has no effect if `honorTimestamps` is false.
1326+
## We recommend enabling this if you want the best possible accuracy for container_ metrics scraped from cadvisor.
1327+
##
1328+
trackTimestampsStaleness: true
1329+
13251330
## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
13261331
##
13271332
sampleLimit: 0

0 commit comments

Comments
 (0)