(dev-v2.6-archive) Update rancher-monitoring to new base 12699d2f, upstream chart kube-prometheus-stack 19.0.0

(partially cherry picked from commit f299cdb7fb)
pull/1680/head
Jiaqi Luo 2021-10-12 12:29:00 -07:00 committed by Arvind Iyengar
parent 142e5bcaa6
commit 33733f4819
No known key found for this signature in database
GPG Key ID: A8DD9BFD6C811498
45 changed files with 76 additions and 1336 deletions

View File

@ -4,9 +4,9 @@ dependencies:
version: 3.4.2 version: 3.4.2
- name: prometheus-node-exporter - name: prometheus-node-exporter
repository: https://prometheus-community.github.io/helm-charts repository: https://prometheus-community.github.io/helm-charts
version: 2.0.3 version: 2.0.4
- name: grafana - name: grafana
repository: https://grafana.github.io/helm-charts repository: https://grafana.github.io/helm-charts
version: 6.14.2 version: 6.16.9
digest: sha256:81699fed266bde12566f54940d5f204b70658a38e4a1533c4f0114db3802426f digest: sha256:cb65f7087c26bba381fdf1478dd8d710b5257855b5c9de67a48997a932112838
generated: "2021-08-17T17:47:41.801621+03:00" generated: "2021-09-23T16:19:49.942745722+03:00"

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Fetch dashboards from provided urls into this chart.""" """Fetch dashboards from provided urls into this chart."""
import json import json
import re
import textwrap import textwrap
from os import makedirs, path from os import makedirs, path
@ -66,7 +67,7 @@ https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-promet
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
namespace: {{ template "kube-prometheus-stack.namespace" . }} namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%%s-%%s" (include "kube-prometheus-stack.fullname" $) "%(name)s" | trunc 63 | trimSuffix "-" }} name: {{ printf "%%s-%%s" (include "kube-prometheus-stack.fullname" $) "%(name)s" | trunc 63 | trimSuffix "-" }}
annotations: annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@ -105,16 +106,25 @@ def yaml_str_repr(struct, indent=2):
text = textwrap.indent(text, ' ' * indent) text = textwrap.indent(text, ' ' * indent)
return text return text
def patch_dashboards_json(content, multicluster_key):
def patch_json_for_multicluster_configuration(content, multicluster_key):
try: try:
content_struct = json.loads(content) content_struct = json.loads(content)
# multicluster
overwrite_list = [] overwrite_list = []
for variable in content_struct['templating']['list']: for variable in content_struct['templating']['list']:
if variable['name'] == 'cluster': if variable['name'] == 'cluster':
variable['hide'] = ':multicluster:' variable['hide'] = ':multicluster:'
overwrite_list.append(variable) overwrite_list.append(variable)
content_struct['templating']['list'] = overwrite_list content_struct['templating']['list'] = overwrite_list
# fix drilldown links. See https://github.com/kubernetes-monitoring/kubernetes-mixin/issues/659
for row in content_struct['rows']:
for panel in row['panels']:
for style in panel.get('styles', []):
if 'linkUrl' in style and style['linkUrl'].startswith('./d'):
style['linkUrl'] = style['linkUrl'].replace('./d', '/d')
content_array = [] content_array = []
original_content_lines = content.split('\n') original_content_lines = content.split('\n')
for i, line in enumerate(json.dumps(content_struct, indent=4).split('\n')): for i, line in enumerate(json.dumps(content_struct, indent=4).split('\n')):
@ -147,6 +157,11 @@ def patch_json_for_multicluster_configuration(content, multicluster_key):
return content return content
def patch_json_set_timezone_as_variable(content):
# content is no more in json format, so we have to replace using regex
return re.sub(r'"timezone"\s*:\s*"(?:\\.|[^\"])*"', '"timezone": "\{\{ .Values.grafana.defaultDashboardsTimezone \}\}"', content, flags=re.IGNORECASE)
def write_group_to_file(resource_name, content, url, destination, min_kubernetes, max_kubernetes, multicluster_key): def write_group_to_file(resource_name, content, url, destination, min_kubernetes, max_kubernetes, multicluster_key):
# initialize header # initialize header
lines = header % { lines = header % {
@ -157,7 +172,8 @@ def write_group_to_file(resource_name, content, url, destination, min_kubernetes
'max_kubernetes': max_kubernetes 'max_kubernetes': max_kubernetes
} }
content = patch_json_for_multicluster_configuration(content, multicluster_key) content = patch_dashboards_json(content, multicluster_key)
content = patch_json_set_timezone_as_variable(content)
filename_struct = {resource_name + '.json': (LiteralStr(content))} filename_struct = {resource_name + '.json': (LiteralStr(content))}
# rules themselves # rules themselves

View File

@ -1,41 +0,0 @@
{{- if and .Values.prometheus.thanosService.enabled .Values.prometheus.thanosServiceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-discovery
namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
app: {{ template "kube-prometheus-stack.name" . }}-thanos-discovery
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
spec:
selector:
matchLabels:
app: {{ template "kube-prometheus-stack.name" . }}-thanos-discovery
release: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
- {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }}
endpoints:
- port: {{ .Values.prometheus.thanosService.httpPortName }}
{{- if .Values.prometheus.thanosServiceMonitor.interval }}
interval: {{ .Values.prometheus.thanosServiceMonitor.interval }}
{{- end }}
{{- if .Values.prometheus.thanosServiceMonitor.scheme }}
scheme: {{ .Values.prometheus.thanosServiceMonitor.scheme }}
{{- end }}
{{- if .Values.prometheus.thanosServiceMonitor.tlsConfig }}
tlsConfig: {{ toYaml .Values.prometheus.thanosServiceMonitor.tlsConfig | nindent 6 }}
{{- end }}
{{- if .Values.prometheus.thanosServiceMonitor.bearerTokenFile }}
bearerTokenFile: {{ .Values.prometheus.thanosServiceMonitor.bearerTokenFile }}
{{- end }}
path: "/metrics"
{{- if .Values.prometheus.thanosServiceMonitor.metricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.prometheus.thanosServiceMonitor.metricRelabelings | indent 6) . }}
{{- end }}
{{- if .Values.prometheus.thanosServiceMonitor.relabelings }}
relabelings:
{{ toYaml .Values.prometheus.thanosServiceMonitor.relabelings | indent 6 }}
{{- end }}
{{- end }}

View File

@ -90,4 +90,4 @@
-- https://github.com/prometheus-community/helm-charts -- https://github.com/prometheus-community/helm-charts
-- https://github.com/prometheus-operator/kube-prometheus -- https://github.com/prometheus-operator/kube-prometheus
-type: application -type: application
-version: 18.0.0 -version: 19.0.0

View File

@ -1,42 +1,6 @@
--- charts-original/README.md --- charts-original/README.md
+++ charts/README.md +++ charts/README.md
@@ -83,7 +83,13 @@ @@ -230,7 +230,39 @@
A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.
+### From 18.x to 19.x
+
+`kubeStateMetrics.serviceMonitor.namespaceOverride` was removed.
+Please use `kube-state-metrics.namespaceOverride` instead.
+
### From 17.x to 18.x
+
Version 18 upgrades prometheus-operator from 0.49.x to 0.50.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRDs manually before updating:
```console
@@ -98,6 +104,7 @@
```
### From 16.x to 17.x
+
Version 17 upgrades prometheus-operator from 0.48.x to 0.49.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRDs manually before updating:
```console
@@ -111,11 +118,12 @@
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
```
-
### From 15.x to 16.x
+
Version 16 upgrades kube-state-metrics to v2.0.0. This includes changed command-line arguments and removed metrics, see this [blog post](https://kubernetes.io/blog/2021/04/13/kube-state-metrics-v-2-0/). This version also removes Grafana dashboards that supported Kubernetes 1.14 or earlier.
### From 14.x to 15.x
+
Version 15 upgrades prometheus-operator from 0.46.x to 0.47.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRDs manually before updating:
```console
@@ -222,7 +230,39 @@
helm show values prometheus-community/kube-prometheus-stack helm show values prometheus-community/kube-prometheus-stack
``` ```

View File

@ -140,43 +140,3 @@
app.kubernetes.io/part-of: {{ template "kube-prometheus-stack.name" . }} app.kubernetes.io/part-of: {{ template "kube-prometheus-stack.name" . }}
chart: {{ template "kube-prometheus-stack.chartref" . }} chart: {{ template "kube-prometheus-stack.chartref" . }}
release: {{ $.Release.Name | quote }} release: {{ $.Release.Name | quote }}
@@ -96,6 +223,39 @@
{{- end -}}
{{- end -}}
+{{/*
+Use the grafana namespace override for multi-namespace deployments in combined charts
+*/}}
+{{- define "kube-prometheus-stack-grafana.namespace" -}}
+ {{- if .Values.grafana.namespaceOverride -}}
+ {{- .Values.grafana.namespaceOverride -}}
+ {{- else -}}
+ {{- .Release.Namespace -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Use the kube-state-metrics namespace override for multi-namespace deployments in combined charts
+*/}}
+{{- define "kube-prometheus-stack-kube-state-metrics.namespace" -}}
+ {{- if index .Values "kube-state-metrics" "namespaceOverride" -}}
+ {{- index .Values "kube-state-metrics" "namespaceOverride" -}}
+ {{- else -}}
+ {{- .Release.Namespace -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Use the prometheus-node-exporter namespace override for multi-namespace deployments in combined charts
+*/}}
+{{- define "kube-prometheus-stack-prometheus-node-exporter.namespace" -}}
+ {{- if index .Values "prometheus-node-exporter" "namespaceOverride" -}}
+ {{- index .Values "prometheus-node-exporter" "namespaceOverride" -}}
+ {{- else -}}
+ {{- .Release.Namespace -}}
+ {{- end -}}
+{{- end -}}
+
{{/* Allow KubeVersion to be overridden. */}}
{{- define "kube-prometheus-stack.kubeVersion" -}}
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}}

View File

@ -24,12 +24,8 @@
{{ toYaml .Values.alertmanager.alertmanagerSpec.nodeSelector | indent 4 }} {{ toYaml .Values.alertmanager.alertmanagerSpec.nodeSelector | indent 4 }}
{{- end }} {{- end }}
paused: {{ .Values.alertmanager.alertmanagerSpec.paused }} paused: {{ .Values.alertmanager.alertmanagerSpec.paused }}
@@ -101,11 +103,11 @@ @@ -104,8 +106,8 @@
labelSelector: - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]}
matchExpressions:
- {key: app, operator: In, values: [alertmanager]}
- - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]}
+ - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]}
{{- end }} {{- end }}
{{- end }} {{- end }}
+ tolerations: {{ include "linux-node-tolerations" . | nindent 4 }} + tolerations: {{ include "linux-node-tolerations" . | nindent 4 }}

View File

@ -20,18 +20,7 @@
{{ toYaml .Values.alertmanager.secret.annotations | indent 4 }} {{ toYaml .Values.alertmanager.secret.annotations | indent 4 }}
{{- end }} {{- end }}
labels: labels:
@@ -13,11 +19,15 @@ @@ -24,4 +30,4 @@
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
data:
{{- if .Values.alertmanager.tplConfig }}
+{{- if eq (typeOf .Values.alertmanager.config) "string" }}
+ alertmanager.yaml: {{ tpl (.Values.alertmanager.config) . | b64enc | quote }}
+{{- else }}
alertmanager.yaml: {{ tpl (toYaml .Values.alertmanager.config) . | b64enc | quote }}
+{{- end }}
{{- else }}
alertmanager.yaml: {{ toYaml .Values.alertmanager.config | b64enc | quote }}
{{- end}}
{{- range $key, $val := .Values.alertmanager.templateFiles }} {{- range $key, $val := .Values.alertmanager.templateFiles }}
{{ $key }}: {{ $val | b64enc | quote }} {{ $key }}: {{ $val | b64enc | quote }}
{{- end }} {{- end }}

View File

@ -1,14 +1,6 @@
--- charts-original/templates/exporters/kube-state-metrics/serviceMonitor.yaml --- charts-original/templates/exporters/kube-state-metrics/serviceMonitor.yaml
+++ charts/templates/exporters/kube-state-metrics/serviceMonitor.yaml +++ charts/templates/exporters/kube-state-metrics/serviceMonitor.yaml
@@ -3,21 +3,24 @@ @@ -10,7 +10,7 @@
kind: ServiceMonitor
metadata:
name: {{ template "kube-prometheus-stack.fullname" . }}-kube-state-metrics
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-kube-state-metrics.namespace" . }}
labels:
app: {{ template "kube-prometheus-stack.name" . }}-kube-state-metrics
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
spec: spec:
jobLabel: app.kubernetes.io/name jobLabel: app.kubernetes.io/name
endpoints: endpoints:
@ -17,36 +9,3 @@
{{- if .Values.kubeStateMetrics.serviceMonitor.interval }} {{- if .Values.kubeStateMetrics.serviceMonitor.interval }}
interval: {{ .Values.kubeStateMetrics.serviceMonitor.interval }} interval: {{ .Values.kubeStateMetrics.serviceMonitor.interval }}
{{- end }} {{- end }}
+ {{- if .Values.kubeStateMetrics.serviceMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.kubeStateMetrics.serviceMonitor.scrapeTimeout }}
+ {{- end }}
{{- if .Values.kubeStateMetrics.serviceMonitor.proxyUrl }}
proxyUrl: {{ .Values.kubeStateMetrics.serviceMonitor.proxyUrl}}
{{- end }}
- honorLabels: true
+ honorLabels: {{ .Values.kubeStateMetrics.serviceMonitor.honorLabels }}
{{- if .Values.kubeStateMetrics.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.kubeStateMetrics.serviceMonitor.metricRelabelings | indent 4) . }}
@@ -34,7 +37,7 @@
{{- if .Values.kubeStateMetrics.serviceMonitor.proxyUrl }}
proxyUrl: {{ .Values.kubeStateMetrics.serviceMonitor.proxyUrl}}
{{- end }}
- honorLabels: true
+ honorLabels: {{ .Values.kubeStateMetrics.serviceMonitor.honorLabels }}
{{- if .Values.kubeStateMetrics.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.kubeStateMetrics.serviceMonitor.metricRelabelings | indent 4) . }}
@@ -44,11 +47,9 @@
{{ toYaml .Values.kubeStateMetrics.serviceMonitor.relabelings | indent 4 }}
{{- end }}
{{- end }}
-{{- if .Values.kubeStateMetrics.serviceMonitor.namespaceOverride }}
namespaceSelector:
matchNames:
- - {{ .Values.kubeStateMetrics.serviceMonitor.namespaceOverride }}
-{{- end }}
+ - {{ printf "%s" (include "kube-prometheus-stack-kube-state-metrics.namespace" .) | quote }}
selector:
matchLabels:
{{- if .Values.kubeStateMetrics.serviceMonitor.selectorOverride }}

View File

@ -1,6 +1,6 @@
--- charts-original/templates/exporters/node-exporter/servicemonitor.yaml --- charts-original/templates/exporters/node-exporter/servicemonitor.yaml
+++ charts/templates/exporters/node-exporter/servicemonitor.yaml +++ charts/templates/exporters/node-exporter/servicemonitor.yaml
@@ -1,9 +1,12 @@ @@ -1,4 +1,7 @@
-{{- if .Values.nodeExporter.enabled }} -{{- if .Values.nodeExporter.enabled }}
+{{- if (and (not .Values.nodeExporter.enabled) .Values.hardenedNodeExporter.enabled) }} +{{- if (and (not .Values.nodeExporter.enabled) .Values.hardenedNodeExporter.enabled) }}
+{{ required "Cannot set .Values.hardenedNodeExporter.enabled=true when .Values.nodeExporter.enabled=false" "" }} +{{ required "Cannot set .Values.hardenedNodeExporter.enabled=true when .Values.nodeExporter.enabled=false" "" }}
@ -9,22 +9,3 @@
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
metadata: metadata:
name: {{ template "kube-prometheus-stack.fullname" . }}-node-exporter
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-prometheus-node-exporter.namespace" . }}
labels:
app: {{ template "kube-prometheus-stack.name" . }}-node-exporter
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
@@ -13,11 +16,9 @@
matchLabels:
app: prometheus-node-exporter
release: {{ $.Release.Name }}
- {{- if (index .Values "prometheus-node-exporter" "namespaceOverride") }}
namespaceSelector:
matchNames:
- - {{ index .Values "prometheus-node-exporter" "namespaceOverride" }}
- {{- end }}
+ - {{ printf "%s" (include "kube-prometheus-stack-prometheus-node-exporter.namespace" .) | quote }}
endpoints:
- port: metrics
{{- if .Values.nodeExporter.serviceMonitor.interval }}

View File

@ -1,11 +0,0 @@
--- charts-original/templates/grafana/configmap-dashboards.yaml
+++ charts/templates/grafana/configmap-dashboards.yaml
@@ -10,7 +10,7 @@
kind: ConfigMap
metadata:
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
- namespace: {{ template "kube-prometheus-stack.namespace" $ }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" $ }}
labels:
{{- if $.Values.grafana.sidecar.dashboards.label }}
{{ $.Values.grafana.sidecar.dashboards.label }}: "1"

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/configmaps-datasources.yaml
+++ charts/templates/grafana/configmaps-datasources.yaml
@@ -3,7 +3,7 @@
kind: ConfigMap
metadata:
name: {{ template "kube-prometheus-stack.fullname" . }}-grafana-datasource
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
{{- if .Values.grafana.sidecar.datasources.annotations }}
annotations:
{{ toYaml .Values.grafana.sidecar.datasources.annotations | indent 4 }}
@@ -23,7 +23,7 @@
{{- if .Values.grafana.sidecar.datasources.url }}
url: {{ .Values.grafana.sidecar.datasources.url }}
{{- else }}
- url: http://{{ template "kube-prometheus-stack.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }}
+ url: http://{{ template "kube-prometheus-stack.fullname" . }}-prometheus.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }}/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }}
{{- end }}
access: proxy
isDefault: true

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/alertmanager-overview.yaml
+++ charts/templates/grafana/dashboards-1.14/alertmanager-overview.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "alertmanager-overview" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -602,7 +602,7 @@
"30d"
]
},
- "timezone": "utc",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Alertmanager / Overview",
"uid": "alertmanager-overview",
"version": 0

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/apiserver.yaml
+++ charts/templates/grafana/dashboards-1.14/apiserver.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "apiserver" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1739,7 +1739,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / API server",
"uid": "09ec8aa1e996d6ffcd6817bbaff4db1b",
"version": 0

View File

@ -1,29 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/cluster-total.yaml
+++ charts/templates/grafana/dashboards-1.14/cluster-total.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "cluster-total" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1831,7 +1831,7 @@
"options": [
],
- "query": "label_values(kube_pod_info, cluster)",
+ "query": "label_values(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)",
"refresh": 2,
"regex": "",
"sort": 0,
@@ -1874,7 +1874,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Networking / Cluster",
"uid": "ff635a025bcfea7bc3dd4f508990a3e9",
"version": 0

View File

@ -1,6 +1,6 @@
--- charts-original/templates/grafana/dashboards-1.14/controller-manager.yaml --- charts-original/templates/grafana/dashboards-1.14/controller-manager.yaml
+++ charts/templates/grafana/dashboards-1.14/controller-manager.yaml +++ charts/templates/grafana/dashboards-1.14/controller-manager.yaml
@@ -4,11 +4,12 @@ @@ -4,7 +4,8 @@
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}} */ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
@ -10,11 +10,6 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "controller-manager" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -107,7 +108,11 @@ @@ -107,7 +108,11 @@
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
@ -133,31 +128,7 @@
"format": "time_series", "format": "time_series",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "{{`{{`}}instance{{`}}`}}", "legendFormat": "{{`{{`}}instance{{`}}`}}",
@@ -1100,7 +1105,7 @@ @@ -1174,4 +1179,5 @@
"options": [
],
- "query": "label_values(kube_pod_info, cluster)",
+ "query": "label_values(up{job=\"kube-controller-manager\"}, cluster)",
"refresh": 2,
"regex": "",
"sort": 1,
@@ -1126,7 +1131,7 @@
"options": [
],
- "query": "label_values(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-controller-manager\"}, instance)",
+ "query": "label_values(up{cluster=\"$cluster\", job=\"kube-controller-manager\"}, instance)",
"refresh": 2,
"regex": "",
"sort": 1,
@@ -1169,9 +1174,10 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Controller Manager",
"uid": "72e0e05bef5099e5f049b05fdc429ed4", "uid": "72e0e05bef5099e5f049b05fdc429ed4",
"version": 0 "version": 0
} }

View File

@ -1,6 +1,6 @@
--- charts-original/templates/grafana/dashboards-1.14/etcd.yaml --- charts-original/templates/grafana/dashboards-1.14/etcd.yaml
+++ charts/templates/grafana/dashboards-1.14/etcd.yaml +++ charts/templates/grafana/dashboards-1.14/etcd.yaml
@@ -4,11 +4,12 @@ @@ -4,7 +4,8 @@
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}} */ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
@ -10,17 +10,7 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }} @@ -1113,4 +1114,5 @@
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1109,8 +1110,9 @@
"30d"
]
},
- "timezone": "browser",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "etcd", "title": "etcd",
"version": 215 "version": 215
} }

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/k8s-coredns.yaml
+++ charts/templates/grafana/dashboards-1.14/k8s-coredns.yaml
@@ -4,7 +4,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-coredns" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1523,7 +1523,7 @@
"1d"
]
},
- "timezone": "utc",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "CoreDNS",
"uid": "vkQ0UHxik",
"version": 2

View File

@ -1,101 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml
+++ charts/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -708,7 +708,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1",
+ "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1",
"pattern": "Value #A",
"thresholds": [
@@ -727,7 +727,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to workloads",
- "linkUrl": "./d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1",
+ "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1",
"pattern": "Value #B",
"thresholds": [
@@ -841,7 +841,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell",
+ "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell",
"pattern": "namespace",
"thresholds": [
@@ -1135,7 +1135,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1",
+ "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1",
"pattern": "Value #A",
"thresholds": [
@@ -1154,7 +1154,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to workloads",
- "linkUrl": "./d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1",
+ "linkUrl": "/d/a87fb0d919ec0ea5f6543124e16c42a5/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1",
"pattern": "Value #B",
"thresholds": [
@@ -1268,7 +1268,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell",
+ "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell",
"pattern": "namespace",
"thresholds": [
@@ -1579,7 +1579,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell",
+ "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell",
"pattern": "namespace",
"thresholds": [
@@ -2805,7 +2805,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell",
+ "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell",
"pattern": "namespace",
"thresholds": [
@@ -2973,7 +2973,7 @@
"options": [
],
- "query": "label_values(node_cpu_seconds_total, cluster)",
+ "query": "label_values(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)",
"refresh": 2,
"regex": "",
"sort": 1,
@@ -3016,7 +3016,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Compute Resources / Cluster",
"uid": "efa86fd1d0c121a26444b636a3f509a8",
"version": 0

View File

@ -1,56 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml
+++ charts/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -671,7 +671,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down",
- "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
+ "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
"pattern": "pod",
"thresholds": [
@@ -1136,7 +1136,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down",
- "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
+ "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
"pattern": "pod",
"thresholds": [
@@ -1456,7 +1456,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
+ "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
"pattern": "pod",
"thresholds": [
@@ -2498,7 +2498,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
+ "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
"pattern": "pod",
"thresholds": [
@@ -2736,7 +2736,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Compute Resources / Namespace (Pods)",
"uid": "85a562078cdf77779eaa1add43ccec1e",
"version": 0

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/k8s-resources-node.yaml
+++ charts/templates/grafana/dashboards-1.14/k8s-resources-node.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-node" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -970,7 +970,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Compute Resources / Node (Pods)",
"uid": "200ac8fdbfbb74b39aff88118e4d1c2c",
"version": 0

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml
+++ charts/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -2419,7 +2419,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Compute Resources / Pod",
"uid": "6581e46e4e5c7ba40a07646395ef7b23",
"version": 0

View File

@ -1,47 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml
+++ charts/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -286,7 +286,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down",
- "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
+ "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
"pattern": "pod",
"thresholds": [
@@ -657,7 +657,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down",
- "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
+ "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
"pattern": "pod",
"thresholds": [
@@ -950,7 +950,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down",
- "linkUrl": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
+ "linkUrl": "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell",
"pattern": "pod",
"thresholds": [
@@ -1978,7 +1978,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Compute Resources / Workload",
"uid": "a164a7f0339f99e89cea5cb47e9be617",
"version": 0

View File

@ -1,47 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml
+++ charts/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -342,7 +342,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down",
- "linkUrl": "./d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2",
+ "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2",
"pattern": "workload",
"thresholds": [
@@ -797,7 +797,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down",
- "linkUrl": "./d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2",
+ "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2",
"pattern": "workload",
"thresholds": [
@@ -1118,7 +1118,7 @@
"link": true,
"linkTargetBlank": false,
"linkTooltip": "Drill down to pods",
- "linkUrl": "./d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$type",
+ "linkUrl": "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$type",
"pattern": "workload",
"thresholds": [
@@ -2143,7 +2143,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Compute Resources / Namespace (Workloads)",
"uid": "a87fb0d919ec0ea5f6543124e16c42a5",
"version": 0

View File

@ -1,6 +1,6 @@
--- charts-original/templates/grafana/dashboards-1.14/kubelet.yaml --- charts-original/templates/grafana/dashboards-1.14/kubelet.yaml
+++ charts/templates/grafana/dashboards-1.14/kubelet.yaml +++ charts/templates/grafana/dashboards-1.14/kubelet.yaml
@@ -4,11 +4,12 @@ @@ -4,7 +4,8 @@
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}} */ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
@ -10,81 +10,7 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }} @@ -2203,7 +2204,7 @@
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "kubelet" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -81,7 +82,8 @@
],
"fields": "",
"values": false
- }
+ },
+ "textMode": "auto"
},
"pluginVersion": "7",
"targets": [
@@ -137,7 +139,8 @@
],
"fields": "",
"values": false
- }
+ },
+ "textMode": "auto"
},
"pluginVersion": "7",
"targets": [
@@ -193,7 +196,8 @@
],
"fields": "",
"values": false
- }
+ },
+ "textMode": "auto"
},
"pluginVersion": "7",
"targets": [
@@ -249,7 +253,8 @@
],
"fields": "",
"values": false
- }
+ },
+ "textMode": "auto"
},
"pluginVersion": "7",
"targets": [
@@ -305,7 +310,8 @@
],
"fields": "",
"values": false
- }
+ },
+ "textMode": "auto"
},
"pluginVersion": "7",
"targets": [
@@ -361,7 +367,8 @@
],
"fields": "",
"values": false
- }
+ },
+ "textMode": "auto"
},
"pluginVersion": "7",
"targets": [
@@ -2171,7 +2178,7 @@
"options": [
],
- "query": "label_values(kube_pod_info, cluster)",
+ "query": "label_values(up{job=\"kubelet\", metrics_path=\"/metrics\"}, cluster)",
"refresh": 2,
"regex": "",
"sort": 1,
@@ -2197,7 +2204,7 @@
"options": [ "options": [
], ],
@ -93,13 +19,7 @@
"refresh": 2, "refresh": 2,
"regex": "", "regex": "",
"sort": 1, "sort": 1,
@@ -2240,9 +2247,10 @@ @@ -2251,4 +2252,5 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Kubelet",
"uid": "3138fa155d5915769fbded898ac09fd9", "uid": "3138fa155d5915769fbded898ac09fd9",
"version": 0 "version": 0
} }

View File

@ -1,29 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/namespace-by-pod.yaml
+++ charts/templates/grafana/dashboards-1.14/namespace-by-pod.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "namespace-by-pod" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1301,7 +1301,7 @@
"options": [
],
- "query": "label_values(kube_pod_info, cluster)",
+ "query": "label_values(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)",
"refresh": 2,
"regex": "",
"sort": 0,
@@ -1456,7 +1456,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Networking / Namespace (Pods)",
"uid": "8b7a8b326d7a6f1f04244066368c67af",
"version": 0

View File

@ -1,29 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/namespace-by-workload.yaml
+++ charts/templates/grafana/dashboards-1.14/namespace-by-workload.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "namespace-by-workload" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1541,7 +1541,7 @@
"options": [
],
- "query": "label_values(kube_pod_info, cluster)",
+ "query": "label_values(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)",
"refresh": 2,
"regex": "",
"sort": 0,
@@ -1728,7 +1728,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Networking / Namespace (Workload)",
"uid": "bbb2a765a623ae38130206c7d94a160f",
"version": 0

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml
+++ charts/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "node-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1056,7 +1056,7 @@
"30d"
]
},
- "timezone": "utc",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Node Exporter / USE Method / Cluster",
"version": 0
}

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/node-rsrc-use.yaml
+++ charts/templates/grafana/dashboards-1.14/node-rsrc-use.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "node-rsrc-use" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1082,7 +1082,7 @@
"30d"
]
},
- "timezone": "utc",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Node Exporter / USE Method / Node",
"version": 0
}

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/nodes.yaml
+++ charts/templates/grafana/dashboards-1.14/nodes.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -984,7 +984,7 @@
"30d"
]
},
- "timezone": "utc",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Node Exporter / Nodes",
"version": 0
}

View File

@ -1,14 +1,5 @@
--- charts-original/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml --- charts-original/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml
+++ charts/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml +++ charts/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -92,14 +92,14 @@ @@ -92,14 +92,14 @@
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
@ -79,12 +70,3 @@
"refresh": 2, "refresh": 2,
"regex": "", "regex": "",
"sort": 1, "sort": 1,
@@ -569,7 +569,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Persistent Volumes",
"uid": "919b92a8e8041bd567af9edab12c840c",
"version": 0

View File

@ -1,29 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/pod-total.yaml
+++ charts/templates/grafana/dashboards-1.14/pod-total.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "pod-total" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1033,7 +1033,7 @@
"options": [
],
- "query": "label_values(kube_pod_info, cluster)",
+ "query": "label_values(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)",
"refresh": 2,
"regex": "",
"sort": 0,
@@ -1220,7 +1220,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Networking / Pod",
"uid": "7a18067ce943a40ae25454675c19ff5c",
"version": 0

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml
+++ charts/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "prometheus-remote-write" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1663,7 +1663,7 @@
"30d"
]
},
- "timezone": "browser",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Prometheus / Remote Write",
"version": 0
}

View File

@ -1,38 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/prometheus.yaml
+++ charts/templates/grafana/dashboards-1.14/prometheus.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "prometheus" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1156,7 +1156,7 @@
"options": [
],
- "query": "label_values(prometheus_build_info, job)",
+ "query": "label_values(prometheus_build_info{job=\"prometheus-k8s\",namespace=\"monitoring\"}, job)",
"refresh": 1,
"regex": "",
"sort": 2,
@@ -1184,7 +1184,7 @@
"options": [
],
- "query": "label_values(prometheus_build_info, instance)",
+ "query": "label_values(prometheus_build_info{job=~\"$job\"}, instance)",
"refresh": 1,
"regex": "",
"sort": 2,
@@ -1227,7 +1227,7 @@
"30d"
]
},
- "timezone": "utc",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Prometheus / Overview",
"uid": "",
"version": 0

View File

@ -1,6 +1,6 @@
--- charts-original/templates/grafana/dashboards-1.14/proxy.yaml --- charts-original/templates/grafana/dashboards-1.14/proxy.yaml
+++ charts/templates/grafana/dashboards-1.14/proxy.yaml +++ charts/templates/grafana/dashboards-1.14/proxy.yaml
@@ -4,11 +4,12 @@ @@ -4,7 +4,8 @@
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}} */ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
@ -10,11 +10,6 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "proxy" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -107,7 +108,11 @@ @@ -107,7 +108,11 @@
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
@ -151,13 +146,7 @@
"refresh": 2, "refresh": 2,
"regex": "", "regex": "",
"sort": 1, "sort": 1,
@@ -1249,9 +1254,9 @@ @@ -1254,4 +1259,4 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Proxy",
"uid": "632e265de029684c40b21cb76bca4f94", "uid": "632e265de029684c40b21cb76bca4f94",
"version": 0 "version": 0
} }

View File

@ -1,6 +1,6 @@
--- charts-original/templates/grafana/dashboards-1.14/scheduler.yaml --- charts-original/templates/grafana/dashboards-1.14/scheduler.yaml
+++ charts/templates/grafana/dashboards-1.14/scheduler.yaml +++ charts/templates/grafana/dashboards-1.14/scheduler.yaml
@@ -4,11 +4,12 @@ @@ -4,7 +4,8 @@
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}} */ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} {{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
@ -10,11 +10,6 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "scheduler" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -107,7 +108,11 @@ @@ -107,7 +108,11 @@
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
@ -172,15 +167,6 @@
"format": "time_series", "format": "time_series",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "{{`{{`}}instance{{`}}`}}", "legendFormat": "{{`{{`}}instance{{`}}`}}",
@@ -1023,7 +1028,7 @@
"options": [
],
- "query": "label_values(kube_pod_info, cluster)",
+ "query": "label_values(up{job=\"kube-scheduler\"}, cluster)",
"refresh": 2,
"regex": "",
"sort": 1,
@@ -1049,7 +1054,7 @@ @@ -1049,7 +1054,7 @@
"options": [ "options": [
@ -190,13 +176,7 @@
"refresh": 2, "refresh": 2,
"regex": "", "regex": "",
"sort": 1, "sort": 1,
@@ -1092,9 +1097,10 @@ @@ -1097,4 +1102,5 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Scheduler",
"uid": "2e6b6a3b4bddf1427b3a55aa1311c656", "uid": "2e6b6a3b4bddf1427b3a55aa1311c656",
"version": 0 "version": 0
} }

View File

@ -1,14 +1,5 @@
--- charts-original/templates/grafana/dashboards-1.14/statefulset.yaml --- charts-original/templates/grafana/dashboards-1.14/statefulset.yaml
+++ charts/templates/grafana/dashboards-1.14/statefulset.yaml +++ charts/templates/grafana/dashboards-1.14/statefulset.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -106,7 +106,7 @@ @@ -106,7 +106,7 @@
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
@ -36,13 +27,7 @@
"format": "time_series", "format": "time_series",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "", "legendFormat": "",
@@ -920,9 +920,9 @@ @@ -925,4 +925,4 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / StatefulSets",
"uid": "a31c1f46e6f727cb37c0d731a7245005", "uid": "a31c1f46e6f727cb37c0d731a7245005",
"version": 0 "version": 0
} }

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/dashboards-1.14/workload-total.yaml
+++ charts/templates/grafana/dashboards-1.14/workload-total.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "workload-total" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1430,7 +1430,7 @@
"30d"
]
},
- "timezone": "UTC",
+ "timezone": "{{ .Values.grafana.defaultDashboardsTimezone }}",
"title": "Kubernetes / Networking / Workload",
"uid": "728bf77cc1166d2f3133bf25846876cc",
"version": 0

View File

@ -1,20 +0,0 @@
--- charts-original/templates/grafana/servicemonitor.yaml
+++ charts/templates/grafana/servicemonitor.yaml
@@ -3,7 +3,7 @@
kind: ServiceMonitor
metadata:
name: {{ template "kube-prometheus-stack.fullname" . }}-grafana
- namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
labels:
app: {{ template "kube-prometheus-stack.name" . }}-grafana
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
@@ -14,7 +14,7 @@
app.kubernetes.io/instance: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
- - {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }}
+ - {{ printf "%s" (include "kube-prometheus-stack-grafana.namespace" .) | quote }}
endpoints:
- port: {{ .Values.grafana.service.portName }}
{{- if .Values.grafana.serviceMonitor.interval }}

View File

@ -1,10 +0,0 @@
--- charts-original/templates/prometheus/ingressThanosSidecar.yaml
+++ charts/templates/prometheus/ingressThanosSidecar.yaml
@@ -71,6 +71,6 @@
{{- end -}}
{{- if .Values.prometheus.thanosIngress.tls }}
tls:
-{{ toYaml .Values.prometheus.thanosIngress.tls | indent 4 }}
+{{ tpl (toYaml .Values.prometheus.thanosIngress.tls | indent 4) . }}
{{- end -}}
{{- end -}}

View File

@ -1,23 +1,6 @@
--- charts-original/templates/prometheus/prometheus.yaml --- charts-original/templates/prometheus/prometheus.yaml
+++ charts/templates/prometheus/prometheus.yaml +++ charts/templates/prometheus/prometheus.yaml
@@ -32,7 +32,15 @@ @@ -64,11 +64,13 @@
{{ toYaml .Values.prometheus.prometheusSpec.apiserverConfig | indent 4}}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.image }}
- image: {{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}
+ {{- if and .Values.prometheus.prometheusSpec.image.tag .Values.prometheus.prometheusSpec.image.sha }}
+ image: "{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}@sha256:{{ .Values.prometheus.prometheusSpec.image.sha }}"
+ {{- else if .Values.prometheus.prometheusSpec.image.sha }}
+ image: "{{ .Values.prometheus.prometheusSpec.image.repository }}@sha256:{{ .Values.prometheus.prometheusSpec.image.sha }}"
+ {{- else if .Values.prometheus.prometheusSpec.image.tag }}
+ image: "{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}"
+ {{- else }}
+ image: "{{ .Values.prometheus.prometheusSpec.image.repository }}"
+ {{- end }}
version: {{ .Values.prometheus.prometheusSpec.image.tag }}
{{- if .Values.prometheus.prometheusSpec.image.sha }}
sha: {{ .Values.prometheus.prometheusSpec.image.sha }}
@@ -56,11 +64,13 @@
externalUrl: "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}" externalUrl: "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}"
{{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }} {{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }}
externalUrl: "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}" externalUrl: "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}"
@ -32,7 +15,7 @@
{{ toYaml .Values.prometheus.prometheusSpec.nodeSelector | indent 4 }} {{ toYaml .Values.prometheus.prometheusSpec.nodeSelector | indent 4 }}
{{- end }} {{- end }}
paused: {{ .Values.prometheus.prometheusSpec.paused }} paused: {{ .Values.prometheus.prometheusSpec.paused }}
@@ -236,8 +246,8 @@ @@ -244,8 +246,8 @@
- {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-prometheus]} - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-prometheus]}
{{- end }} {{- end }}
{{- end }} {{- end }}
@ -42,7 +25,7 @@
{{ toYaml .Values.prometheus.prometheusSpec.tolerations | indent 4 }} {{ toYaml .Values.prometheus.prometheusSpec.tolerations | indent 4 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.prometheusSpec.topologySpreadConstraints }} {{- if .Values.prometheus.prometheusSpec.topologySpreadConstraints }}
@@ -276,7 +286,7 @@ @@ -284,7 +286,7 @@
{{- end }} {{- end }}
{{- if .Values.prometheus.prometheusSpec.containers }} {{- if .Values.prometheus.prometheusSpec.containers }}
containers: containers:
@ -51,7 +34,7 @@
{{- end }} {{- end }}
{{- if .Values.prometheus.prometheusSpec.initContainers }} {{- if .Values.prometheus.prometheusSpec.initContainers }}
initContainers: initContainers:
@@ -292,6 +302,7 @@ @@ -300,6 +302,7 @@
{{- if .Values.prometheus.prometheusSpec.disableCompaction }} {{- if .Values.prometheus.prometheusSpec.disableCompaction }}
disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }} disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }}
{{- end }} {{- end }}
@ -59,22 +42,7 @@
portName: {{ .Values.prometheus.prometheusSpec.portName }} portName: {{ .Values.prometheus.prometheusSpec.portName }}
{{- end }} {{- end }}
{{- if .Values.prometheus.prometheusSpec.volumes }} {{- if .Values.prometheus.prometheusSpec.volumes }}
@@ -333,6 +344,19 @@ @@ -356,3 +359,4 @@
{{- if .Values.prometheus.prometheusSpec.enforcedSampleLimit }}
enforcedSampleLimit: {{ .Values.prometheus.prometheusSpec.enforcedSampleLimit }}
{{- end }}
+{{- if .Values.prometheus.prometheusSpec.enforcedTargetLimit }}
+ enforcedTargetLimit: {{ .Values.prometheus.prometheusSpec.enforcedTargetLimit }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.enforcedLabelLimit }}
+ enforcedLabelLimit: {{ .Values.prometheus.prometheusSpec.enforcedLabelLimit }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.enforcedLabelNameLengthLimit }}
+ enforcedLabelNameLengthLimit: {{ .Values.prometheus.prometheusSpec.enforcedLabelNameLengthLimit }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.enforcedLabelValueLengthLimit}}
+ enforcedLabelValueLengthLimit: {{ .Values.prometheus.prometheusSpec.enforcedLabelValueLengthLimit }}
+{{- end }}
{{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} {{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }}
allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }}
{{- end }} {{- end }}

View File

@ -1,15 +0,0 @@
--- charts-original/templates/prometheus/serviceThanosSidecar.yaml
+++ charts/templates/prometheus/serviceThanosSidecar.yaml
@@ -24,6 +24,12 @@
{{- if eq .Values.prometheus.thanosService.type "NodePort" }}
nodePort: {{ .Values.prometheus.thanosService.nodePort }}
{{- end }}
+ - name: {{ .Values.prometheus.thanosService.httpPortName }}
+ port: {{ .Values.prometheus.thanosService.httpPort }}
+ targetPort: {{ .Values.prometheus.thanosService.targetHttpPort }}
+ {{- if eq .Values.prometheus.thanosService.type "NodePort" }}
+ nodePort: {{ .Values.prometheus.thanosService.httpNodePort }}
+ {{- end }}
selector:
app.kubernetes.io/name: prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus

View File

@ -1,15 +0,0 @@
--- charts-original/templates/prometheus/serviceThanosSidecarExternal.yaml
+++ charts/templates/prometheus/serviceThanosSidecarExternal.yaml
@@ -31,6 +31,12 @@
{{- if eq .Values.prometheus.thanosServiceExternal.type "NodePort" }}
nodePort: {{ .Values.prometheus.thanosServiceExternal.nodePort }}
{{- end }}
+ - name: {{ .Values.prometheus.thanosServiceExternal.httpPortName }}
+ port: {{ .Values.prometheus.thanosServiceExternal.httpPort }}
+ targetPort: {{ .Values.prometheus.thanosServiceExternal.targetHttpPort }}
+ {{- if eq .Values.prometheus.thanosServiceExternal.type "NodePort" }}
+ nodePort: {{ .Values.prometheus.thanosServiceExternal.httpNodePort }}
+ {{- end }}
selector:
app.kubernetes.io/name: prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus

View File

@ -528,24 +528,7 @@
## ForceDeployDatasources Create datasource configmap even if grafana deployment has been disabled ## ForceDeployDatasources Create datasource configmap even if grafana deployment has been disabled
## ##
forceDeployDatasources: false forceDeployDatasources: false
@@ -631,10 +1098,15 @@ @@ -679,6 +1146,7 @@
##
forceDeployDashboards: false
- ## Deploy default dashboards.
+ ## Deploy default dashboards
##
defaultDashboardsEnabled: true
+ ## Timezone for the default dashboards
+ ## Other options are: browser or a specific timezone, i.e. Europe/Luxembourg
+ ##
+ defaultDashboardsTimezone: utc
+
adminPassword: prom-operator
ingress:
@@ -674,6 +1146,7 @@
dashboards: dashboards:
enabled: true enabled: true
label: grafana_dashboard label: grafana_dashboard
@ -553,16 +536,7 @@
## Annotations for Grafana dashboard configmaps ## Annotations for Grafana dashboard configmaps
## ##
@@ -683,6 +1156,8 @@ @@ -737,7 +1205,60 @@
enabled: false
etcd:
enabled: false
+ provider:
+ allowUiUpdates: false
datasources:
enabled: true
defaultDatasourceEnabled: true
@@ -730,7 +1205,60 @@
## Passed to grafana subchart and used by servicemonitor below ## Passed to grafana subchart and used by servicemonitor below
## ##
service: service:
@ -624,7 +598,7 @@
## If true, create a serviceMonitor for grafana ## If true, create a serviceMonitor for grafana
## ##
@@ -760,6 +1288,14 @@ @@ -767,6 +1288,14 @@
# targetLabel: nodename # targetLabel: nodename
# replacement: $1 # replacement: $1
# action: replace # action: replace
@ -639,7 +613,7 @@
## Component scraping the kube api server ## Component scraping the kube api server
## ##
@@ -921,7 +1457,7 @@ @@ -928,7 +1457,7 @@
## Component scraping the kube controller manager ## Component scraping the kube controller manager
## ##
kubeControllerManager: kubeControllerManager:
@ -648,7 +622,7 @@
## If your kube controller manager is not deployed as a pod, specify IPs it can be found on ## If your kube controller manager is not deployed as a pod, specify IPs it can be found on
## ##
@@ -1068,7 +1604,7 @@ @@ -1075,7 +1604,7 @@
## Component scraping etcd ## Component scraping etcd
## ##
kubeEtcd: kubeEtcd:
@ -657,7 +631,7 @@
## If your etcd is not deployed as a pod, specify IPs it can be found on ## If your etcd is not deployed as a pod, specify IPs it can be found on
## ##
@@ -1133,7 +1669,7 @@ @@ -1140,7 +1669,7 @@
## Component scraping kube scheduler ## Component scraping kube scheduler
## ##
kubeScheduler: kubeScheduler:
@ -666,7 +640,7 @@
## If your kube scheduler is not deployed as a pod, specify IPs it can be found on ## If your kube scheduler is not deployed as a pod, specify IPs it can be found on
## ##
@@ -1191,7 +1727,7 @@ @@ -1198,7 +1727,7 @@
## Component scraping kube proxy ## Component scraping kube proxy
## ##
kubeProxy: kubeProxy:
@ -675,36 +649,7 @@
## If your kube proxy is not deployed as a pod, specify IPs it can be found on ## If your kube proxy is not deployed as a pod, specify IPs it can be found on
## ##
@@ -1245,15 +1781,15 @@ @@ -1294,6 +1823,13 @@
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
+ ## Scrape Timeout. If not set, the Prometheus default scrape timeout is used.
+ ##
+ scrapeTimeout: ""
## proxyUrl: URL of a proxy that should be used for scraping.
##
proxyUrl: ""
## Override serviceMonitor selector
##
selectorOverride: {}
- ## Override namespace selector
- ##
- namespaceOverride: ""
## Metric relabel configs to apply to samples before ingestion.
##
@@ -1272,6 +1808,9 @@
# replacement: $1
# action: replace
+ # Keep labels from scraped data, overriding server-side labels
+ honorLabels: true
+
# Enable self metrics configuration for Service Monitor
selfMonitor:
enabled: false
@@ -1284,6 +1823,13 @@
create: true create: true
podSecurityPolicy: podSecurityPolicy:
enabled: true enabled: true
@ -718,7 +663,7 @@
## Deploy node exporter as a daemonset to all nodes ## Deploy node exporter as a daemonset to all nodes
## ##
@@ -1337,6 +1883,16 @@ @@ -1347,6 +1883,16 @@
extraArgs: extraArgs:
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/) - --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
- --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$ - --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
@ -735,7 +680,7 @@
## Manages Prometheus and Alertmanager components ## Manages Prometheus and Alertmanager components
## ##
@@ -1349,8 +1905,8 @@ @@ -1359,8 +1905,8 @@
enabled: true enabled: true
# Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants # Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants
tlsMinVersion: VersionTLS13 tlsMinVersion: VersionTLS13
@ -746,20 +691,16 @@
## Admission webhook support for PrometheusRules resources added in Prometheus Operator 0.30 can be enabled to prevent incorrectly formatted ## Admission webhook support for PrometheusRules resources added in Prometheus Operator 0.30 can be enabled to prevent incorrectly formatted
## rules from making their way into prometheus and potentially preventing the container from starting ## rules from making their way into prometheus and potentially preventing the container from starting
@@ -1367,9 +1923,9 @@ @@ -1377,7 +1923,7 @@
patch: patch:
enabled: true enabled: true
image: image:
- repository: jettech/kube-webhook-certgen - repository: k8s.gcr.io/ingress-nginx/kube-webhook-certgen
- tag: v1.5.2
- sha: ""
+ repository: rancher-mirrored-k8s.gcr.io-ingress-nginx-kube-webhook-certgen + repository: rancher-mirrored-k8s.gcr.io-ingress-nginx-kube-webhook-certgen
+ tag: v1.0 tag: v1.0
+ sha: "f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068" sha: "f3b6b39a6062328c095337b4cadcefd1612348fdd5190b1dcbcb9b9e90bd8068"
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
resources: {} @@ -1526,13 +2072,13 @@
## Provide a priority class name to the webhook patching job
@@ -1516,13 +2072,13 @@
## Resource limits & requests ## Resource limits & requests
## ##
@ -780,7 +721,7 @@
# Required for use in managed kubernetes clusters (such as AWS EKS) with custom CNI (such as calico), # Required for use in managed kubernetes clusters (such as AWS EKS) with custom CNI (such as calico),
# because control-plane managed by AWS cannot communicate with pods' IP CIDR and admission webhooks are not working # because control-plane managed by AWS cannot communicate with pods' IP CIDR and admission webhooks are not working
@@ -1575,7 +2131,7 @@ @@ -1585,7 +2131,7 @@
## Prometheus-operator image ## Prometheus-operator image
## ##
image: image:
@ -789,7 +730,7 @@
tag: v0.50.0 tag: v0.50.0
sha: "" sha: ""
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
@@ -1591,7 +2147,7 @@ @@ -1601,7 +2147,7 @@
## Prometheus-config-reloader image to use for config and rule reloading ## Prometheus-config-reloader image to use for config and rule reloading
## ##
prometheusConfigReloaderImage: prometheusConfigReloaderImage:
@ -798,92 +739,7 @@
tag: v0.50.0 tag: v0.50.0
sha: "" sha: ""
@@ -1641,18 +2197,50 @@ @@ -1736,7 +2282,7 @@
enabled: false
annotations: {}
labels: {}
- portName: grpc
- port: 10901
- targetPort: "grpc"
- clusterIP: "None"
## Service type
##
type: ClusterIP
- ## Port to expose on each node
+ ## gRPC port config
+ portName: grpc
+ port: 10901
+ targetPort: "grpc"
+
+ ## HTTP port config (for metrics)
+ httpPortName: http
+ httpPort: 10902
+ targetHttpPort: "http"
+
+ ## ClusterIP to assign
+ # Default is to make this a headless service ("None")
+ clusterIP: "None"
+
+ ## Port to expose on each node, if service type is NodePort
##
nodePort: 30901
+ httpNodePort: 30902
+
+ # ServiceMonitor to scrape Sidecar metrics
+ # Needs thanosService to be enabled as well
+ thanosServiceMonitor:
+ enabled: false
+ interval: ""
+
+ ## scheme: HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS.
+ scheme: ""
+
+ ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS.
+ ## Of type: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig
+ tlsConfig: {}
+
+ bearerTokenFile:
+
+ ## Metric relabel configs to apply to samples before ingestion.
+ metricRelabelings: []
+
+ ## relabel configs to apply to samples before ingestion.
+ relabelings: []
# Service for external access to sidecar
# Enabling this creates a service to expose thanos-sidecar outside the cluster.
@@ -1660,11 +2248,18 @@
enabled: false
annotations: {}
labels: {}
+ loadBalancerIP: ""
+ loadBalancerSourceRanges: []
+
+ ## gRPC port config
portName: grpc
port: 10901
targetPort: "grpc"
- loadBalancerIP: ""
- loadBalancerSourceRanges: []
+
+ ## HTTP port config (for metrics)
+ httpPortName: http
+ httpPort: 10902
+ targetHttpPort: "http"
## Service type
##
@@ -1673,6 +2268,7 @@
## Port to expose on each node
##
nodePort: 30901
+ httpNodePort: 30902
## Configuration for Prometheus service
##
@@ -1686,7 +2282,7 @@
port: 9090 port: 9090
## To be used with a proxy extraContainer port ## To be used with a proxy extraContainer port
@ -892,7 +748,7 @@
## List of IP addresses at which the Prometheus server service is available ## List of IP addresses at which the Prometheus server service is available
## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
@@ -1959,7 +2555,7 @@ @@ -2009,7 +2555,7 @@
## Image of Prometheus. ## Image of Prometheus.
## ##
image: image:
@ -901,7 +757,7 @@
tag: v2.28.1 tag: v2.28.1
sha: "" sha: ""
@@ -2022,6 +2618,11 @@ @@ -2072,6 +2618,11 @@
## ##
externalUrl: "" externalUrl: ""
@ -913,7 +769,7 @@
## Define which Nodes the Pods are scheduled on. ## Define which Nodes the Pods are scheduled on.
## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## ref: https://kubernetes.io/docs/user-guide/node-selection/
## ##
@@ -2054,7 +2655,7 @@ @@ -2104,7 +2655,7 @@
## prometheus resource to be created with selectors based on values in the helm deployment, ## prometheus resource to be created with selectors based on values in the helm deployment,
## which will also match the PrometheusRule resources created ## which will also match the PrometheusRule resources created
## ##
@ -922,7 +778,7 @@
## PrometheusRules to be selected for target discovery. ## PrometheusRules to be selected for target discovery.
## If {}, select all PrometheusRules ## If {}, select all PrometheusRules
@@ -2079,7 +2680,7 @@ @@ -2129,7 +2680,7 @@
## prometheus resource to be created with selectors based on values in the helm deployment, ## prometheus resource to be created with selectors based on values in the helm deployment,
## which will also match the servicemonitors created ## which will also match the servicemonitors created
## ##
@ -931,7 +787,7 @@
## ServiceMonitors to be selected for target discovery. ## ServiceMonitors to be selected for target discovery.
## If {}, select all ServiceMonitors ## If {}, select all ServiceMonitors
@@ -2102,7 +2703,7 @@ @@ -2152,7 +2703,7 @@
## prometheus resource to be created with selectors based on values in the helm deployment, ## prometheus resource to be created with selectors based on values in the helm deployment,
## which will also match the podmonitors created ## which will also match the podmonitors created
## ##
@ -940,7 +796,7 @@
## PodMonitors to be selected for target discovery. ## PodMonitors to be selected for target discovery.
## If {}, select all PodMonitors ## If {}, select all PodMonitors
@@ -2233,9 +2834,13 @@ @@ -2283,9 +2834,13 @@
## Resource limits & requests ## Resource limits & requests
## ##
@ -957,7 +813,7 @@
## Prometheus StorageSpec for persistent data ## Prometheus StorageSpec for persistent data
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md
@@ -2258,7 +2863,13 @@ @@ -2308,7 +2863,13 @@
# medium: Memory # medium: Memory
# Additional volumes on the output StatefulSet definition. # Additional volumes on the output StatefulSet definition.
@ -972,7 +828,7 @@
# Additional VolumeMounts on the output StatefulSet definition. # Additional VolumeMounts on the output StatefulSet definition.
volumeMounts: [] volumeMounts: []
@@ -2373,6 +2984,11 @@ @@ -2423,6 +2984,11 @@
## ##
thanos: {} thanos: {}
@ -984,7 +840,7 @@
## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod.
## if using proxy extraContainer update targetPort with proxy container port ## if using proxy extraContainer update targetPort with proxy container port
containers: [] containers: []
@@ -2383,7 +2999,7 @@ @@ -2433,7 +2999,7 @@
## PortName to use for Prometheus. ## PortName to use for Prometheus.
## ##
@ -993,32 +849,3 @@
## ArbitraryFSAccessThroughSMs configures whether configuration based on a service monitor can access arbitrary files ## ArbitraryFSAccessThroughSMs configures whether configuration based on a service monitor can access arbitrary files
## on the file system of the Prometheus container e.g. bearer token files. ## on the file system of the Prometheus container e.g. bearer token files.
@@ -2420,6 +3036,28 @@
## number of samples/series under the desired limit. Note that if SampleLimit is lower that value will be taken instead.
enforcedSampleLimit: false
+ ## EnforcedTargetLimit defines a global limit on the number of scraped targets. This overrides any TargetLimit set
+ ## per ServiceMonitor or/and PodMonitor. It is meant to be used by admins to enforce the TargetLimit to keep the overall
+ ## number of targets under the desired limit. Note that if TargetLimit is lower, that value will be taken instead, except
+ ## if either value is zero, in which case the non-zero value will be used. If both values are zero, no limit is enforced.
+ enforcedTargetLimit: false
+
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. If more than this number of labels are present
+ ## post metric-relabeling, the entire scrape will be treated as failed. 0 means no limit. Only valid in Prometheus versions
+ ## 2.27.0 and newer.
+ enforcedLabelLimit: false
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. If a label name is longer than this number
+ ## post metric-relabeling, the entire scrape will be treated as failed. 0 means no limit. Only valid in Prometheus versions
+ ## 2.27.0 and newer.
+ enforcedLabelNameLengthLimit: false
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. If a label value is longer than this
+ ## number post metric-relabeling, the entire scrape will be treated as failed. 0 means no limit. Only valid in Prometheus
+ ## versions 2.27.0 and newer.
+ enforcedLabelValueLengthLimit: false
+
## AllowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus. This is still experimental
## in Prometheus so it may change in any upcoming release.
allowOverlappingBlocks: false

View File

@ -1,6 +1,6 @@
url: https://github.com/prometheus-community/helm-charts.git url: https://github.com/prometheus-community/helm-charts.git
subdirectory: charts/kube-prometheus-stack subdirectory: charts/kube-prometheus-stack
commit: cc8b7cb3d4f3c7445b56eeb91ca64340efdae2ed commit: 12699d2f2d299902c38e80c911ab4b6901bdc686
version: 100.0.0 version: 100.0.0
additionalCharts: additionalCharts:
- workingDir: charts-crd - workingDir: charts-crd