diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 56949182aacf..90024fc4502e 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -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 diff --git a/charts/kube-prometheus-stack/templates/exporters/kubelet/servicemonitor.yaml b/charts/kube-prometheus-stack/templates/exporters/kubelet/servicemonitor.yaml index d0443c3343c0..842ebf6d15ba 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kubelet/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kubelet/servicemonitor.yaml @@ -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 @@ -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 @@ -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) . }} @@ -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) . }} @@ -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) . }} diff --git a/charts/kube-prometheus-stack/values.yaml b/charts/kube-prometheus-stack/values.yaml index fc06729e6673..a146563b1596 100644 --- a/charts/kube-prometheus-stack/values.yaml +++ b/charts/kube-prometheus-stack/values.yaml @@ -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