rancher-charts/packages/rancher-monitoring/rancher-monitoring.patch

1423 lines
72 KiB
Diff

diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/Chart.yaml packages/rancher-monitoring/charts/Chart.yaml
--- packages/rancher-monitoring/charts-original/Chart.yaml
+++ packages/rancher-monitoring/charts/Chart.yaml
@@ -1,7 +1,11 @@
apiVersion: v1
appVersion: 0.38.1
-description: Provides easy monitoring definitions for Kubernetes services, and deployment
- and management of Prometheus instances.
+annotations:
+ catalog.cattle.io/certified: rancher
+ catalog.cattle.io/namespace: monitoring-system
+ catalog.cattle.io/release-name: rancher-monitoring
+ catalog.cattle.io/ui-component: monitoring
+description: A Rancher chart that modifies the upstream Prometheus Operator chart, which provides easy monitoring definitions for Kubernetes services and the deployment and management of Prometheus instances, and enables Prometheus Adapter on a default Prometheus instance.
engine: gotpl
home: https://github.com/coreos/prometheus-operator
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
@@ -13,7 +17,7 @@
- name: bismarck
- email: gianrubio@gmail.com
name: gianrubio
-name: prometheus-operator
+name: rancher-monitoring
sources:
- https://github.com/coreos/kube-prometheus
- https://github.com/coreos/prometheus-operator
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/README.md packages/rancher-monitoring/charts/README.md
--- packages/rancher-monitoring/charts-original/README.md
+++ packages/rancher-monitoring/charts/README.md
@@ -291,6 +291,7 @@
| `prometheus.prometheusSpec.evaluationInterval` | Interval between consecutive evaluations. | `""` |
| `prometheus.prometheusSpec.externalLabels` | The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). | `{}` |
| `prometheus.prometheusSpec.externalUrl` | The external URL the Prometheus instances will be available under. This is necessary to generate correct URLs. This is necessary if Prometheus is not served from root of a DNS name. | `""` |
+| `prometheus.prometheusSpec.ignoreNamespaceSelectors` | Ignore NamespaceSelector settings from the PodMonitor and ServiceMonitor configs. If true, PodMonitors and ServiceMonitors can only discover Pods and Services within the namespace they are deployed into | `false` |
| `prometheus.prometheusSpec.image.repository` | Base image to use for a Prometheus deployment. | `quay.io/prometheus/prometheus` |
| `prometheus.prometheusSpec.image.tag` | Tag of Prometheus container image to be deployed. | `v2.18.1` |
| `prometheus.prometheusSpec.listenLocal` | ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP. | `false` |
@@ -465,17 +466,23 @@
| `grafana.namespaceOverride` | Override the deployment namespace of grafana | `""` (`Release.Namespace`) |
| `grafana.rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires rbac.pspEnabled) | `true` |
| `grafana.service.portName` | Allow to customize Grafana service portname. Will be used by servicemonitor as well | `service` |
+| `grafana.service.port` | Kubernetes port where Grafana is exposed | `80` |
+| `grafana.service.targetPort` | Internal service port for Grafana | `3000` |
+| `grafana.service.nodePort` | Port to expose on each node running Grafana | `30950` |
+| `grafana.service.type` | Type of Kubernetes Service used for Grafana | `ClusterIP` |
| `grafana.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the grafana instance. | `` |
| `grafana.serviceMonitor.relabelings` | The `relabel_configs` for scraping the grafana instance. | `` |
| `grafana.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the grafana instance | `true` |
| `grafana.sidecar.dashboards.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.dashboards.label }}=1` | `true` |
| `grafana.sidecar.dashboards.annotations` | Create annotations on dashboard configmaps | `{}` |
| `grafana.sidecar.dashboards.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as dashboards | `grafana_dashboard` |
+| `grafana.sidecar.dashboards.searchNamespace` | If specified, the sidecar will search for dashboard config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | `grafana-dashboards` |
| `grafana.sidecar.datasources.annotations` | Create annotations on datasource configmaps | `{}` |
| `grafana.sidecar.datasources.createPrometheusReplicasDatasources` | Create datasource for each Pod of Prometheus StatefulSet i.e. `Prometheus-0`, `Prometheus-1` | `false` |
| `grafana.sidecar.datasources.defaultDatasourceEnabled` | Enable Grafana `Prometheus` default datasource | `true` |
| `grafana.sidecar.datasources.enabled` | Enable the Grafana sidecar to automatically load datasources with a label `{{ grafana.sidecar.datasources.label }}=1` | `true` |
| `grafana.sidecar.datasources.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as datasources configurations | `grafana_datasource` |
+| `grafana.sidecar.datasources.searchNamespace` | If specified, the sidecar will search for datasources config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | `grafana-datasources` |
### Exporters
| Parameter | Description | Default |
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/requirements.yaml packages/rancher-monitoring/charts/requirements.yaml
--- packages/rancher-monitoring/charts-original/requirements.yaml
+++ packages/rancher-monitoring/charts/requirements.yaml
@@ -14,3 +14,74 @@
version: "5.3.*"
repository: https://kubernetes-charts.storage.googleapis.com/
condition: grafana.enabled
+
+ - name: prometheus-adapter
+ version: 2.4.*
+ repository: https://kubernetes-charts.storage.googleapis.com/
+ condition: prometheus-adapter.enabled
+
+ - name: rancher-pushprox
+ alias: rkeControllerManager
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: rkeControllerManager.enabled
+
+ - name: rancher-pushprox
+ alias: rkeScheduler
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: rkeScheduler.enabled
+
+ - name: rancher-pushprox
+ alias: rkeProxy
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: rkeProxy.enabled
+
+ - name: rancher-pushprox
+ alias: rkeEtcd
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: rkeEtcd.enabled
+
+ - name: rancher-pushprox
+ alias: k3sControllerManager
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: k3sControllerManager.enabled
+
+ - name: rancher-pushprox
+ alias: k3sScheduler
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: k3sScheduler.enabled
+
+ - name: rancher-pushprox
+ alias: k3sProxy
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: k3sProxy.enabled
+
+ - name: rancher-pushprox
+ alias: kubeAdmControllerManager
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: kubeAdmControllerManager.enabled
+
+ - name: rancher-pushprox
+ alias: kubeAdmScheduler
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: kubeAdmScheduler.enabled
+
+ - name: rancher-pushprox
+ alias: kubeAdmProxy
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: kubeAdmProxy.enabled
+
+ - name: rancher-pushprox
+ alias: kubeAdmEtcd
+ version: 0.1.0
+ repository: file://../../rancher-pushprox/charts
+ condition: kubeAdmEtcd.enabled
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/exporters/core-dns/servicemonitor.yaml packages/rancher-monitoring/charts/templates/exporters/core-dns/servicemonitor.yaml
--- packages/rancher-monitoring/charts-original/templates/exporters/core-dns/servicemonitor.yaml
+++ packages/rancher-monitoring/charts/templates/exporters/core-dns/servicemonitor.yaml
@@ -3,7 +3,7 @@
kind: ServiceMonitor
metadata:
name: {{ template "prometheus-operator.fullname" . }}-coredns
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: "kube-system"
labels:
app: {{ template "prometheus-operator.name" . }}-coredns
{{ include "prometheus-operator.labels" . | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/exporters/kube-api-server/servicemonitor.yaml packages/rancher-monitoring/charts/templates/exporters/kube-api-server/servicemonitor.yaml
--- packages/rancher-monitoring/charts-original/templates/exporters/kube-api-server/servicemonitor.yaml
+++ packages/rancher-monitoring/charts/templates/exporters/kube-api-server/servicemonitor.yaml
@@ -3,7 +3,7 @@
kind: ServiceMonitor
metadata:
name: {{ template "prometheus-operator.fullname" . }}-apiserver
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: default
labels:
app: {{ template "prometheus-operator.name" . }}-apiserver
{{ include "prometheus-operator.labels" . | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/exporters/kube-controller-manager/servicemonitor.yaml packages/rancher-monitoring/charts/templates/exporters/kube-controller-manager/servicemonitor.yaml
--- packages/rancher-monitoring/charts-original/templates/exporters/kube-controller-manager/servicemonitor.yaml
+++ packages/rancher-monitoring/charts/templates/exporters/kube-controller-manager/servicemonitor.yaml
@@ -3,7 +3,7 @@
kind: ServiceMonitor
metadata:
name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: "kube-system"
labels:
app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
{{ include "prometheus-operator.labels" . | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/exporters/kubelet/servicemonitor.yaml packages/rancher-monitoring/charts/templates/exporters/kubelet/servicemonitor.yaml
--- packages/rancher-monitoring/charts-original/templates/exporters/kubelet/servicemonitor.yaml
+++ packages/rancher-monitoring/charts/templates/exporters/kubelet/servicemonitor.yaml
@@ -3,7 +3,7 @@
kind: ServiceMonitor
metadata:
name: {{ template "prometheus-operator.fullname" . }}-kubelet
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.kubelet.namespace }}
labels:
app: {{ template "prometheus-operator.name" . }}-kubelet
{{- include "prometheus-operator.labels" . | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/configmap-dashboards.yaml packages/rancher-monitoring/charts/templates/grafana/configmap-dashboards.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/configmap-dashboards.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/configmap-dashboards.yaml
@@ -10,7 +10,7 @@
kind: ConfigMap
metadata:
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
labels:
{{- if $.Values.grafana.sidecar.dashboards.label }}
{{ $.Values.grafana.sidecar.dashboards.label }}: "1"
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/configmaps-datasources.yaml packages/rancher-monitoring/charts/templates/grafana/configmaps-datasources.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/configmaps-datasources.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/configmaps-datasources.yaml
@@ -3,7 +3,7 @@
kind: ConfigMap
metadata:
name: {{ template "prometheus-operator.fullname" . }}-grafana-datasource
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.datasources.searchNamespace }}
{{- if .Values.grafana.sidecar.datasources.annotations }}
annotations:
{{ toYaml .Values.grafana.sidecar.datasources.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/etcd.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/etcd.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/etcd.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/etcd.yaml
@@ -4,11 +4,12 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeEtcd.enabled }}
+{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
+{{- if or .Values.kubeEtcd.enabled .Values.rkeEtcd.enabled .Values.kubeAdmEtcd.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1113,4 +1114,5 @@
"uid": "c2f4e12cdf69feb95caa41a5a1b423d9",
"version": 215
}
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-node-rsrc-use.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-node-rsrc-use.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-node-rsrc-use.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-node-rsrc-use.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-node-rsrc-use" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-cluster.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-cluster.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-cluster.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-cluster.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-namespace.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-namespace.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-namespace.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-namespace.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-pod.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-pod.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-pod.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-pod.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-workload.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-workload.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-workload.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-workload.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/nodes.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/nodes.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/nodes.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/nodes.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/persistentvolumesusage.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/persistentvolumesusage.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/persistentvolumesusage.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/persistentvolumesusage.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/pods.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/pods.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/pods.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/pods.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "pods" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards/statefulset.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards/statefulset.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards/statefulset.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards/statefulset.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/apiserver.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/apiserver.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/apiserver.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/apiserver.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "apiserver" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/cluster-total.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/cluster-total.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/cluster-total.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/cluster-total.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "cluster-total" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/controller-manager.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/controller-manager.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/controller-manager.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/controller-manager.yaml
@@ -4,11 +4,12 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeControllerManager.enabled }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
+{{- if or .Values.kubeControllerManager.enabled .Values.rkeControllerManager.enabled .Values.k3sControllerManager.enabled .Values.kubeAdmControllerManager.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "controller-manager" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1139,4 +1140,5 @@
"uid": "72e0e05bef5099e5f049b05fdc429ed4",
"version": 0
}
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/etcd.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/etcd.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/etcd.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/etcd.yaml
@@ -4,11 +4,12 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeEtcd.enabled }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
+{{- if or .Values.kubeEtcd.enabled .Values.rkeEtcd.enabled .Values.kubeAdmEtcd.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1113,4 +1114,5 @@
"uid": "c2f4e12cdf69feb95caa41a5a1b423d9",
"version": 215
}
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-coredns.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-coredns.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-coredns.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-coredns.yaml
@@ -4,7 +4,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-coredns" | trunc 63 | trimSuffix "-" }}
labels:
{{- if $.Values.grafana.sidecar.dashboards.label }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-node.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-node.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-node.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-node.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-node" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/kubelet.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/kubelet.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/kubelet.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/kubelet.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "kubelet" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/namespace-by-pod.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/namespace-by-pod.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/namespace-by-pod.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/namespace-by-pod.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "namespace-by-pod" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/namespace-by-workload.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/namespace-by-workload.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/namespace-by-workload.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/namespace-by-workload.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "namespace-by-workload" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "node-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/node-rsrc-use.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/node-rsrc-use.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/node-rsrc-use.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/node-rsrc-use.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "node-rsrc-use" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/nodes.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/nodes.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/nodes.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/nodes.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/pod-total.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/pod-total.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/pod-total.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/pod-total.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "pod-total" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "prometheus-remote-write" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/prometheus.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/prometheus.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/prometheus.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/prometheus.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "prometheus" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/proxy.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/proxy.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/proxy.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/proxy.yaml
@@ -4,11 +4,12 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeProxy.enabled }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
+{{- if or .Values.kubeProxy.enabled .Values.rkeProxy.enabled .Values.k3sProxy.enabled .Values.kubeAdmProxy.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "proxy" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1218,4 +1219,4 @@
"uid": "632e265de029684c40b21cb76bca4f94",
"version": 0
}
-{{- end }}
\ No newline at end of file
+{{- end }}{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/scheduler.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/scheduler.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/scheduler.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/scheduler.yaml
@@ -4,11 +4,12 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeScheduler.enabled }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
+{{- if or .Values.kubeScheduler.enabled .Values.rkeScheduler.enabled .Values.k3sScheduler.enabled .Values.kubeAdmScheduler.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "scheduler" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
@@ -1063,4 +1064,5 @@
"uid": "2e6b6a3b4bddf1427b3a55aa1311c656",
"version": 0
}
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/statefulset.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/statefulset.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/statefulset.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/statefulset.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/workload-total.yaml packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/workload-total.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/dashboards-1.14/workload-total.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/dashboards-1.14/workload-total.yaml
@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ template "prometheus-operator.namespace" . }}
+ namespace: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "workload-total" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/grafana/namespaces.yaml packages/rancher-monitoring/charts/templates/grafana/namespaces.yaml
--- packages/rancher-monitoring/charts-original/templates/grafana/namespaces.yaml
+++ packages/rancher-monitoring/charts/templates/grafana/namespaces.yaml
@@ -0,0 +1,19 @@
+{{- if and .Values.grafana.enabled }}
+{{- if or .Values.grafana.sidecar.dashboards.enabled .Values.grafana.defaultDashboardsEnabled }}
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
+ labels:
+ name: {{ .Values.grafana.sidecar.dashboards.searchNamespace }}
+{{- end }}
+---
+{{- if or .Values.grafana.sidecar.dashboards.enabled .Values.grafana.defaultDashboardsEnabled }}
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: {{ .Values.grafana.sidecar.datasources.searchNamespace }}
+ labels:
+ name: {{ .Values.grafana.sidecar.datasources.searchNamespace }}
+{{- end }}
+{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/prometheus/prometheus.yaml packages/rancher-monitoring/charts/templates/prometheus/prometheus.yaml
--- packages/rancher-monitoring/charts-original/templates/prometheus/prometheus.yaml
+++ packages/rancher-monitoring/charts/templates/prometheus/prometheus.yaml
@@ -56,6 +56,9 @@
{{- else }}
externalUrl: http://{{ template "prometheus-operator.fullname" . }}-prometheus.{{ template "prometheus-operator.namespace" . }}:{{ .Values.prometheus.service.port }}
{{- end }}
+{{- if .Values.prometheus.prometheusSpec.ignoreNamespaceSelectors }}
+ ignoreNamespaceSelectors: {{ .Values.prometheus.prometheusSpec.ignoreNamespaceSelectors }}
+{{- end }}
{{- if .Values.prometheus.prometheusSpec.nodeSelector }}
nodeSelector:
{{ toYaml .Values.prometheus.prometheusSpec.nodeSelector | indent 4 }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/prometheus/rules/etcd.yaml packages/rancher-monitoring/charts/templates/prometheus/rules/etcd.yaml
--- packages/rancher-monitoring/charts-original/templates/prometheus/rules/etcd.yaml
+++ packages/rancher-monitoring/charts/templates/prometheus/rules/etcd.yaml
@@ -4,7 +4,8 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeEtcd.enabled .Values.defaultRules.rules.etcd }}
+{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.etcd }}
+{{- if or .Values.kubeEtcd.enabled .Values.rkeEtcd.enabled .Values.kubeAdmEtcd.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
@@ -152,4 +153,5 @@
for: 10m
labels:
severity: warning
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/prometheus/rules/kube-scheduler.rules.yaml packages/rancher-monitoring/charts/templates/prometheus/rules/kube-scheduler.rules.yaml
--- packages/rancher-monitoring/charts-original/templates/prometheus/rules/kube-scheduler.rules.yaml
+++ packages/rancher-monitoring/charts/templates/prometheus/rules/kube-scheduler.rules.yaml
@@ -4,7 +4,8 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeScheduler }}
+{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubeScheduler }}
+{{- if or .Values.kubeScheduler.enabled .Values.rkeScheduler.enabled .Values.k3sScheduler.enabled .Values.kubeAdmScheduler.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
@@ -60,4 +61,5 @@
labels:
quantile: '0.5'
record: cluster_quantile:scheduler_binding_latency:histogram_quantile
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/prometheus/rules/kubernetes-absent.yaml packages/rancher-monitoring/charts/templates/prometheus/rules/kubernetes-absent.yaml
--- packages/rancher-monitoring/charts-original/templates/prometheus/rules/kubernetes-absent.yaml
+++ packages/rancher-monitoring/charts/templates/prometheus/rules/kubernetes-absent.yaml
@@ -58,7 +58,7 @@
labels:
severity: critical
{{- end }}
-{{- if .Values.kubeControllerManager.enabled }}
+{{- if or .Values.kubeControllerManager.enabled .Values.rkeControllerManager.enabled .Values.k3sControllerManager.enabled .Values.kubeAdmControllerManager.enabled }}
- alert: KubeControllerManagerDown
annotations:
message: KubeControllerManager has disappeared from Prometheus target discovery.
@@ -68,7 +68,7 @@
labels:
severity: critical
{{- end }}
-{{- if .Values.kubeScheduler.enabled }}
+{{- if or .Values.kubeScheduler.enabled .Values.rkeScheduler.enabled .Values.k3sScheduler.enabled .Values.kubeAdmScheduler.enabled }}
- alert: KubeSchedulerDown
annotations:
message: KubeScheduler has disappeared from Prometheus target discovery.
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/prometheus/rules-1.14/etcd.yaml packages/rancher-monitoring/charts/templates/prometheus/rules-1.14/etcd.yaml
--- packages/rancher-monitoring/charts-original/templates/prometheus/rules-1.14/etcd.yaml
+++ packages/rancher-monitoring/charts/templates/prometheus/rules-1.14/etcd.yaml
@@ -4,7 +4,8 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeEtcd.enabled .Values.defaultRules.rules.etcd }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.etcd }}
+{{- if or .Values.kubeEtcd.enabled .Values.rkeEtcd.enabled .Values.kubeAdmEtcd.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
@@ -152,4 +153,5 @@
for: 10m
labels:
severity: warning
-{{- end }}
\ No newline at end of file
+{{- end }}
+{{- end }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml packages/rancher-monitoring/charts/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml
--- packages/rancher-monitoring/charts-original/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml
+++ packages/rancher-monitoring/charts/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml
@@ -4,7 +4,8 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeScheduler }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubeScheduler }}
+{{- if or .Values.kubeScheduler.enabled .Values.rkeScheduler.enabled .Values.k3sScheduler.enabled .Values.kubeAdmScheduler.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
@@ -60,4 +61,5 @@
labels:
quantile: '0.5'
record: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml packages/rancher-monitoring/charts/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml
--- packages/rancher-monitoring/charts-original/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml
+++ packages/rancher-monitoring/charts/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml
@@ -4,7 +4,8 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeControllerManager.enabled }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create }}
+{{- if or .Values.kubeControllerManager.enabled .Values.rkeControllerManager.enabled .Values.k3sControllerManager.enabled .Values.kubeAdmControllerManager.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
@@ -24,7 +25,7 @@
groups:
- name: kubernetes-system-controller-manager
rules:
-{{- if .Values.kubeControllerManager.enabled }}
+{{- if or .Values.kubeControllerManager.enabled .Values.rkeControllerManager.enabled .Values.k3sControllerManager.enabled .Values.kubeAdmControllerManager.enabled }}
- alert: KubeControllerManagerDown
annotations:
message: KubeControllerManager has disappeared from Prometheus target discovery.
@@ -34,4 +35,5 @@
labels:
severity: critical
{{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml packages/rancher-monitoring/charts/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml
--- packages/rancher-monitoring/charts-original/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml
+++ packages/rancher-monitoring/charts/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml
@@ -4,7 +4,8 @@
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeScheduler }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubeScheduler }}
+{{- if or .Values.kubeScheduler.enabled .Values.rkeScheduler.enabled .Values.k3sScheduler.enabled .Values.kubeAdmScheduler.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
@@ -24,7 +25,7 @@
groups:
- name: kubernetes-system-scheduler
rules:
-{{- if .Values.kubeScheduler.enabled }}
+{{- if or .Values.kubeScheduler.enabled .Values.rkeScheduler.enabled .Values.k3sScheduler.enabled .Values.kubeAdmScheduler.enabled }}
- alert: KubeSchedulerDown
annotations:
message: KubeScheduler has disappeared from Prometheus target discovery.
@@ -34,4 +35,5 @@
labels:
severity: critical
{{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/rancher-monitoring/grafana-configmap-roles.yaml packages/rancher-monitoring/charts/templates/rancher-monitoring/grafana-configmap-roles.yaml
--- packages/rancher-monitoring/charts-original/templates/rancher-monitoring/grafana-configmap-roles.yaml
+++ packages/rancher-monitoring/charts/templates/rancher-monitoring/grafana-configmap-roles.yaml
@@ -0,0 +1,22 @@
+{{- if .Values.monitoringRoles }}
+{{- if and .Values.monitoringRoles.create .Values.grafana.enabled }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: grafana-config-edit
+ labels: {{ include "prometheus-operator.labels" . | nindent 4 }}
+rules:
+- apiGroups: [""] # "" indicates the core API group
+ resources: ["configmaps", "secrets"]
+ verbs: ["*"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: grafana-config-view
+ labels: {{ include "prometheus-operator.labels" . | nindent 4 }}
+rules:
+- apiGroups: [""] # "" indicates the core API group
+ resources: ["configmaps", "secrets"]
+ verbs: ["get", "watch", "list"]
+{{- end }}{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/templates/rancher-monitoring/monitoring-roles.yaml packages/rancher-monitoring/charts/templates/rancher-monitoring/monitoring-roles.yaml
--- packages/rancher-monitoring/charts-original/templates/rancher-monitoring/monitoring-roles.yaml
+++ packages/rancher-monitoring/charts/templates/rancher-monitoring/monitoring-roles.yaml
@@ -0,0 +1,85 @@
+{{- if .Values.monitoringRoles }}{{- if .Values.monitoringRoles.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: monitoring-admin
+ labels: {{ include "prometheus-operator.labels" . | nindent 4 }}
+ {{- if .Values.monitoringRoles.aggregateRolesForRBAC }}
+ rbac.authorization.k8s.io/aggregate-to-admin: "true"
+ {{- end }}
+rules:
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["prometheuses"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["alertmanagers"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["servicemonitors"]
+ verbs: ["*"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["podmonitors"]
+ verbs: ["*"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["prometheusrules"]
+ verbs: ["*"]
+- apiGroups: [""] # "" indicates the core API group
+ resources: ["configmaps", "secrets"]
+ verbs: ["*"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: monitoring-edit
+ labels: {{ include "prometheus-operator.labels" . | nindent 4 }}
+ {{- if .Values.monitoringRoles.aggregateRolesForRBAC }}
+ rbac.authorization.k8s.io/aggregate-to-edit: "true"
+ {{- end }}
+rules:
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["prometheuses"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["alertmanagers"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["servicemonitors"]
+ verbs: ["*"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["podmonitors"]
+ verbs: ["*"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["prometheusrules"]
+ verbs: ["*"]
+- apiGroups: [""] # "" indicates the core API group
+ resources: ["configmaps", "secrets"]
+ verbs: ["*"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: monitoring-view
+ labels: {{ include "prometheus-operator.labels" . | nindent 4 }}
+ {{- if .Values.monitoringRoles.aggregateRolesForRBAC }}
+ rbac.authorization.k8s.io/aggregate-to-view: "true"
+ {{- end }}
+rules:
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["prometheuses"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["alertmanagers"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["servicemonitors"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["podmonitors"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: ["monitoring.coreos.com"] # "" indicates the core API group
+ resources: ["prometheusrules"]
+ verbs: ["get", "watch", "list"]
+- apiGroups: [""] # "" indicates the core API group
+ resources: ["configmaps", "secrets"]
+ verbs: ["get", "watch", "list"]
+{{- end }}{{- end }}
\ No newline at end of file
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-monitoring/charts-original/values.yaml packages/rancher-monitoring/charts/values.yaml
--- packages/rancher-monitoring/charts-original/values.yaml
+++ packages/rancher-monitoring/charts/values.yaml
@@ -2,13 +2,186 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
+# Rancher Monitoring Configuration
+
+## Deploy some default ClusterRoles to allow users to interact with Prometheus CRs, ConfigMaps, and Secrets
+##
+monitoringRoles:
+ create: true
+ aggregateRolesForRBAC: false
+
+## Configuration for prometheus-adapter
+## ref: https://github.com/helm/charts/tree/master/stable/prometheus-adapter
+##
+prometheus-adapter:
+ enabled: true
+ prometheus:
+ # Change this if you change the namespaceOverride or nameOverride of prometheus-operator
+ url: http://rancher-monitoring-prometheus.monitoring-system.svc
+ port: 9090
+
+## RKE PushProx Monitoring
+## ref: https://github.com/rancher/dev-charts/tree/master/packages/rancher-pushprox
+##
+rkeControllerManager:
+ enabled: false
+ metricsPort: 10252
+ component: kube-controller-manager
+ clients:
+ port: 10011
+ nodeSelector:
+ node-role.kubernetes.io/controlplane: "true"
+ tolerations:
+ - effect: "NoSchedule"
+ operator: "Exists"
+
+rkeScheduler:
+ enabled: false
+ metricsPort: 10251
+ component: kube-scheduler
+ clients:
+ port: 10012
+ nodeSelector:
+ node-role.kubernetes.io/controlplane: "true"
+ tolerations:
+ - effect: "NoSchedule"
+ operator: "Exists"
+
+rkeProxy:
+ enabled: false
+ metricsPort: 10249
+ component: kube-proxy
+ clients:
+ port: 10013
+ useLocalhost: true
+ tolerations:
+ - effect: "NoSchedule"
+ operator: "Exists"
+
+rkeEtcd:
+ enabled: false
+ metricsPort: 2379
+ component: kube-etcd
+ clients:
+ port: 10014
+ https:
+ enabled: true
+ certDir: /etc/kubernetes/ssl
+ certFile: kube-etcd-*.pem
+ keyFile: kube-etcd-*-key.pem
+ caCertFile: kube-ca.pem
+ nodeSelector:
+ node-role.kubernetes.io/etcd: "true"
+ tolerations:
+ - effect: "NoExecute"
+ operator: "Exists"
+
+## k3s PushProx Monitoring
+## ref: https://github.com/rancher/dev-charts/tree/master/packages/rancher-pushprox
+##
+k3sControllerManager:
+ enabled: false
+ metricsPort: 10252
+ component: kube-controller-manager
+ clients:
+ port: 10011
+ nodeSelector:
+ node-role.kubernetes.io/master: "true"
+
+k3sScheduler:
+ enabled: false
+ metricsPort: 10251
+ component: kube-scheduler
+ clients:
+ port: 10012
+ nodeSelector:
+ node-role.kubernetes.io/master: "true"
+
+k3sProxy:
+ enabled: false
+ metricsPort: 10249
+ component: kube-proxy
+ clients:
+ port: 10013
+ useLocalhost: true
+
+## KubeADM PushProx Monitoring
+## ref: https://github.com/rancher/dev-charts/tree/master/packages/rancher-pushprox
+##
+kubeAdmControllerManager:
+ enabled: false
+ metricsPort: 10257
+ component: kube-controller-manager
+ clients:
+ port: 10011
+ useLocalhost: true
+ https:
+ enabled: true
+ useServiceAccountCredentials: true
+ insecureSkipVerify: true
+ nodeSelector:
+ node-role.kubernetes.io/master: ""
+ tolerations:
+ - effect: "NoSchedule"
+ key: node-role.kubernetes.io/master
+ operator: "Exists"
+
+kubeAdmScheduler:
+ enabled: false
+ metricsPort: 10259
+ component: kube-scheduler
+ clients:
+ port: 10012
+ useLocalhost: true
+ https:
+ enabled: true
+ useServiceAccountCredentials: true
+ insecureSkipVerify: true
+ nodeSelector:
+ node-role.kubernetes.io/master: ""
+ tolerations:
+ - effect: "NoSchedule"
+ key: node-role.kubernetes.io/master
+ operator: "Equal"
+
+kubeAdmProxy:
+ enabled: false
+ metricsPort: 10249
+ component: kube-proxy
+ clients:
+ port: 10013
+ useLocalhost: true
+ tolerations:
+ - effect: "NoSchedule"
+ key: node-role.kubernetes.io/master
+ operator: "Equal"
+
+kubeAdmEtcd:
+ enabled: false
+ metricsPort: 2381
+ component: kube-etcd
+ clients:
+ port: 10014
+ useLocalhost: true
+ nodeSelector:
+ node-role.kubernetes.io/master: ""
+ tolerations:
+ - effect: "NoSchedule"
+ key: node-role.kubernetes.io/master
+ operator: "Equal"
+
+
+# Prometheus Operator Configuration
+
## Provide a name in place of prometheus-operator for `app:` labels
+## NOTE: If you change this value, you must update the prometheus-adapter.prometheus.url
##
-nameOverride: ""
+nameOverride: "rancher-monitoring"
## Override the deployment namespace
+## NOTE: If you change this value, you must update the prometheus-adapter.prometheus.url
##
-namespaceOverride: ""
+namespaceOverride: "monitoring-system"
## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6
##
@@ -102,7 +275,7 @@
## Deploy alertmanager
##
- enabled: true
+ enabled: false
## Api that prometheus will use to communicate with alertmanager. Possible values are v1, v2
##
@@ -409,9 +582,13 @@
## Define resources requests and limits for single Pods.
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
##
- resources: {}
- # requests:
- # memory: 400Mi
+ resources:
+ limits:
+ memory: 500Mi
+ cpu: 1000m
+ requests:
+ memory: 100Mi
+ cpu: 100m
## Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node.
## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided.
@@ -529,6 +706,7 @@
dashboards:
enabled: true
label: grafana_dashboard
+ searchNamespace: grafana-dashboards
## Annotations for Grafana dashboard configmaps
##
@@ -547,6 +725,7 @@
## ref: https://git.io/fjaBS
createPrometheusReplicasDatasources: false
label: grafana_datasource
+ searchNamespace: grafana-datasources
extraConfigmapMounts: []
# - name: certs-configmap
@@ -574,6 +753,19 @@
##
service:
portName: service
+ ## Port for Grafana Service to listen on
+ ##
+ port: 80
+ ## To be used with a proxy extraContainer port
+ ##
+ targetPort: 3000
+ ## Port to expose on each node
+ ## Only used if service.type is 'NodePort'
+ ##
+ nodePort: 30950
+ ## Service type
+ ##
+ type: ClusterIP
## If true, create a serviceMonitor for grafana
##
@@ -599,6 +791,14 @@
# targetLabel: nodename
# replacement: $1
# action: replace
+
+ resources:
+ limits:
+ memory: 200Mi
+ cpu: 200m
+ requests:
+ memory: 100Mi
+ cpu: 100m
## Component scraping the kube api server
##
@@ -755,7 +955,7 @@
## Component scraping the kube controller manager
##
kubeControllerManager:
- enabled: true
+ enabled: false
## If your kube controller manager is not deployed as a pod, specify IPs it can be found on
##
@@ -888,7 +1088,7 @@
## Component scraping etcd
##
kubeEtcd:
- enabled: true
+ enabled: false
## If your etcd is not deployed as a pod, specify IPs it can be found on
##
@@ -948,7 +1148,7 @@
## Component scraping kube scheduler
##
kubeScheduler:
- enabled: true
+ enabled: false
## If your kube scheduler is not deployed as a pod, specify IPs it can be found on
##
@@ -1001,7 +1201,7 @@
## Component scraping kube proxy
##
kubeProxy:
- enabled: true
+ enabled: false
## If your kube proxy is not deployed as a pod, specify IPs it can be found on
##
@@ -1075,6 +1275,13 @@
create: true
podSecurityPolicy:
enabled: true
+ resources:
+ limits:
+ cpu: 100m
+ memory: 200Mi
+ requests:
+ cpu: 100m
+ memory: 130Mi
## Deploy node exporter as a daemonset to all nodes
##
@@ -1124,6 +1331,16 @@
extraArgs:
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/)
- --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$
+ service:
+ port: 9796
+ targetPort: 9796
+ resources:
+ limits:
+ cpu: 200m
+ memory: 50Mi
+ requests:
+ cpu: 100m
+ memory: 30Mi
## Manages Prometheus and Alertmanager components
##
@@ -1280,13 +1497,13 @@
## Resource limits & requests
##
- resources: {}
- # limits:
- # cpu: 200m
- # memory: 200Mi
- # requests:
- # cpu: 100m
- # memory: 100Mi
+ resources:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 100m
+ memory: 100Mi
# 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
@@ -1628,6 +1845,11 @@
##
externalUrl: ""
+ ## Ignore NamespaceSelector settings from the PodMonitor and ServiceMonitor configs
+ ## If true, PodMonitors and ServiceMonitors can only discover Pods and Services within the namespace they are deployed into
+ ##
+ ignoreNamespaceSelectors: true
+
## Define which Nodes the Pods are scheduled on.
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
@@ -1802,9 +2024,13 @@
## Resource limits & requests
##
- resources: {}
- # requests:
- # memory: 400Mi
+ resources:
+ limits:
+ memory: 500Mi
+ cpu: 1000m
+ requests:
+ memory: 100Mi
+ cpu: 100m
## Prometheus StorageSpec for persistent data
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/storage.md