Skip to content

Commit

Permalink
[kube-prometheus-stack] feature(kubelet): Add trackTimestampsStaleness (
Browse files Browse the repository at this point in the history
#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]>
  • Loading branch information
Breee and QuentinBisson authored Dec 12, 2024
1 parent f890772 commit c6c8375
Show file tree
Hide file tree
Showing 3 changed files with 11 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 @@ -23,7 +23,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 66.3.1
version: 66.4.0
appVersion: v0.78.2
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ spec:
{{- end }}
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecureSkipVerify: true
Expand Down Expand Up @@ -118,6 +119,7 @@ spec:
{{- end }}
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecureSkipVerify: true
Expand All @@ -144,6 +146,7 @@ spec:
{{- end }}
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
{{- if .Values.kubelet.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.kubelet.serviceMonitor.metricRelabelings | indent 4) . }}
Expand All @@ -166,6 +169,7 @@ spec:
{{- end }}
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
{{- if .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings | indent 4) . }}
Expand Down Expand Up @@ -211,6 +215,7 @@ spec:
{{- end }}
honorLabels: {{ .Values.kubelet.serviceMonitor.honorLabels }}
honorTimestamps: {{ .Values.kubelet.serviceMonitor.honorTimestamps }}
trackTimestampsStaleness: {{ .Values.kubelet.serviceMonitor.trackTimestampsStaleness }}
{{- if .Values.kubelet.serviceMonitor.resourceMetricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.kubelet.serviceMonitor.resourceMetricRelabelings | indent 4) . }}
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 @@ -1322,6 +1322,11 @@ kubelet:
##
honorTimestamps: true

## 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.
## We recommend enabling this if you want the best possible accuracy for container_ metrics scraped from cadvisor.
##
trackTimestampsStaleness: true

## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
##
sampleLimit: 0
Expand Down

0 comments on commit c6c8375

Please sign in to comment.