diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/alertmanager/extrasecret.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/alertmanager/extrasecret.yaml new file mode 100644 index 000000000..ecd8f4702 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/alertmanager/extrasecret.yaml @@ -0,0 +1,20 @@ +{{- if .Values.alertmanager.extraSecret.data -}} +{{- $secretName := printf "alertmanager-%s-extra" (include "kube-prometheus-stack.fullname" . ) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ default $secretName .Values.alertmanager.extraSecret.name }} + namespace: {{ template "kube-prometheus-stack.namespace" . }} +{{- if .Values.alertmanager.extraSecret.annotations }} + annotations: +{{ toYaml .Values.alertmanager.extraSecret.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-alertmanager + app.kubernetes.io/component: alertmanager +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +data: +{{- range $key, $val := .Values.alertmanager.extraSecret.data }} + {{ $key }}: {{ $val | b64enc | quote }} +{{- end }} +{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/extrasecret.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/extrasecret.yaml new file mode 100644 index 000000000..17f3478a4 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/extrasecret.yaml @@ -0,0 +1,20 @@ +{{- if .Values.prometheus.extraSecret.data -}} +{{- $secretName := printf "prometheus-%s-extra" (include "kube-prometheus-stack.fullname" . ) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ default $secretName .Values.prometheus.extraSecret.name }} + namespace: {{ template "kube-prometheus-stack.namespace" . }} +{{- if .Values.prometheus.extraSecret.annotations }} + annotations: +{{ toYaml .Values.prometheus.extraSecret.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "kube-prometheus-stack.name" . }}-prometheus + app.kubernetes.io/component: prometheus +{{ include "kube-prometheus-stack.labels" . | indent 4 }} +data: +{{- range $key, $val := .Values.prometheus.extraSecret.data }} + {{ $key }}: {{ $val | b64enc | quote }} +{{- end }} +{{- end }} diff --git a/packages/rancher-monitoring/generated-changes/overlay/unittests/alertmanager/ingress_test.yaml b/packages/rancher-monitoring/generated-changes/overlay/unittests/alertmanager/ingress_test.yaml new file mode 100644 index 000000000..986c7563f --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/overlay/unittests/alertmanager/ingress_test.yaml @@ -0,0 +1,97 @@ +suite: test ingress +templates: + - alertmanager/ingress.yaml +tests: + - it: should be empty if alertmanager is not enabled + set: + alertmanager.enabled: false + alertmanager.ingress.enabled: true + asserts: + - hasDocuments: + count: 0 + - it: should be empty if ingress is not enabled + set: + alertmanager.enabled: true + alertmanager.ingress.enabled: false + asserts: + - hasDocuments: + count: 0 + - it: should have apiVersion extensions/v1beta1 for k8s < 1.16 + set: + alertmanager.enabled: true + alertmanager.ingress.enabled: true + capabilities: + majorVersion: 1 + minorVersion: 15 + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Ingress + - isAPIVersion: + of: extensions/v1beta1 + - it: should have apiVersion networking.k8s.io/v1beta1 for k8s >= 1.16 < 1.19 + set: + alertmanager.enabled: true + alertmanager.ingress.enabled: true + capabilities: + majorVersion: 1 + minorVersion: 16 + apiVersions: + - networking.k8s.io/v1beta1 + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Ingress + - isAPIVersion: + of: networking.k8s.io/v1beta1 + - it: should have apiVersion networking.k8s.io/v1 for k8s >= 1.19 < 1.22 + set: + alertmanager.enabled: true + alertmanager.ingress.enabled: true + capabilities: + majorVersion: 1 + minorVersion: 10 + apiVersions: + - networking.k8s.io/v1 + - networking.k8s.io/v1beta1 + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Ingress + - isAPIVersion: + of: networking.k8s.io/v1beta1 + - it: should have apiVersion networking.k8s.io/v1 for k8s >= 1.22 + set: + alertmanager.enabled: true + alertmanager.ingress.enabled: true + capabilities: + majorVersion: 1 + minorVersion: 22 + apiVersions: + - networking.k8s.io/v1 + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Ingress + - isAPIVersion: + of: networking.k8s.io/v1 + + - it: should have explicit pathType ImplementationSpecific for networking.k8s.io/v1 by default + set: + alertmanager.enabled: true + alertmanager.ingress.enabled: true + capabilities: + majorVersion: 1 + minorVersion: 19 + apiVersions: + - networking.k8s.io/v1 + asserts: + - hasDocuments: + count: 1 + - equal: + path: spec.rules[0].http.paths[0].pathType + value: ImplementationSpecific diff --git a/packages/rancher-monitoring/generated-changes/patch/.helmignore.patch b/packages/rancher-monitoring/generated-changes/patch/.helmignore.patch new file mode 100644 index 000000000..50d5eb31c --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/.helmignore.patch @@ -0,0 +1,8 @@ +--- charts-original/.helmignore ++++ charts/.helmignore +@@ -24,3 +24,5 @@ + hack/ + ci/ + kube-prometheus-*.tgz ++ ++unittests/ diff --git a/packages/rancher-monitoring/generated-changes/patch/Chart.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/Chart.yaml.patch index 5208fce37..d7924ba6b 100644 --- a/packages/rancher-monitoring/generated-changes/patch/Chart.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/Chart.yaml.patch @@ -24,8 +24,8 @@ +sources: + - https://github.com/prometheus-community/helm-charts + - https://github.com/prometheus-operator/kube-prometheus -+version: 17.0.0 -+appVersion: 0.49.0 ++version: 18.0.0 ++appVersion: 0.50.0 +kubeVersion: ">=1.16.0-0" +home: https://github.com/prometheus-operator/kube-prometheus +keywords: diff --git a/packages/rancher-monitoring/generated-changes/patch/README.md.patch b/packages/rancher-monitoring/generated-changes/patch/README.md.patch index 87805fe12..f9d38ea25 100644 --- a/packages/rancher-monitoring/generated-changes/patch/README.md.patch +++ b/packages/rancher-monitoring/generated-changes/patch/README.md.patch @@ -1,6 +1,30 @@ --- charts-original/README.md +++ charts/README.md -@@ -208,7 +208,39 @@ +@@ -83,8 +83,22 @@ + + A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. + ++### 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 ++kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml ++kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml ++kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml ++kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml ++kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml ++kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml ++kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml ++kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml ++``` ++ + ### From 16.x to 17.x +-Version 15 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: ++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 + kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +@@ -208,7 +222,39 @@ helm show values prometheus-community/kube-prometheus-stack ``` diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagerconfigs.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagerconfigs.yaml.patch new file mode 100644 index 000000000..1883e8eee --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagerconfigs.yaml.patch @@ -0,0 +1,8 @@ +--- charts-original/crds/crd-alertmanagerconfigs.yaml ++++ charts/crds/crd-alertmanagerconfigs.yaml +@@ -1,4 +1,4 @@ +-# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml ++# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml + + --- + apiVersion: apiextensions.k8s.io/v1 diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagers.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagers.yaml.patch new file mode 100644 index 000000000..dc865f45b --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/crds/crd-alertmanagers.yaml.patch @@ -0,0 +1,8 @@ +--- charts-original/crds/crd-alertmanagers.yaml ++++ charts/crds/crd-alertmanagers.yaml +@@ -1,4 +1,4 @@ +-# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml ++# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml + + --- + apiVersion: apiextensions.k8s.io/v1 diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-podmonitors.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-podmonitors.yaml.patch new file mode 100644 index 000000000..eaf965f0c --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/crds/crd-podmonitors.yaml.patch @@ -0,0 +1,157 @@ +--- charts-original/crds/crd-podmonitors.yaml ++++ charts/crds/crd-podmonitors.yaml +@@ -1,4 +1,4 @@ +-# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml ++# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml + + --- + apiVersion: apiextensions.k8s.io/v1 +@@ -43,6 +43,23 @@ + jobLabel: + description: The label to use to retrieve the job name from. + type: string ++ labelLimit: ++ description: Per-scrape limit on number of labels that will be accepted ++ for a sample. Only valid in Prometheus versions 2.27.0 and newer. ++ format: int64 ++ type: integer ++ labelNameLengthLimit: ++ description: Per-scrape limit on length of labels name that will be ++ accepted for a sample. Only valid in Prometheus versions 2.27.0 ++ and newer. ++ format: int64 ++ type: integer ++ labelValueLengthLimit: ++ description: Per-scrape limit on length of labels value that will ++ be accepted for a sample. Only valid in Prometheus versions 2.27.0 ++ and newer. ++ format: int64 ++ type: integer + namespaceSelector: + description: Selector to select which namespaces the Endpoints objects + are discovered from. +@@ -63,6 +80,33 @@ + description: PodMetricsEndpoint defines a scrapeable endpoint of + a Kubernetes Pod serving Prometheus metrics. + properties: ++ authorization: ++ description: Authorization section for this endpoint ++ properties: ++ credentials: ++ description: The secret's key that contains the credentials ++ of the request ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: ++ description: Set the authentication type. Defaults to Bearer, ++ Basic will cause an error ++ type: string ++ type: object + basicAuth: + description: 'BasicAuth allow an endpoint to authenticate over + basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint' +@@ -183,6 +227,90 @@ + type: string + type: object + type: array ++ oauth2: ++ description: OAuth2 for the URL. Only valid in Prometheus versions ++ 2.27.0 and newer. ++ properties: ++ clientId: ++ description: The secret or configmap containing the OAuth2 ++ client id ++ properties: ++ configMap: ++ description: ConfigMap containing data to use for the ++ targets. ++ properties: ++ key: ++ description: The key to select. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the ConfigMap or its ++ key must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ secret: ++ description: Secret containing data to use for the targets. ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key ++ must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: object ++ clientSecret: ++ description: The secret containing the OAuth2 client secret ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ endpointParams: ++ additionalProperties: ++ type: string ++ description: Parameters to append to the token URL ++ type: object ++ scopes: ++ description: OAuth2 scopes used for the token request ++ items: ++ type: string ++ type: array ++ tokenUrl: ++ description: The URL to fetch the token from ++ minLength: 1 ++ type: string ++ required: ++ - clientId ++ - clientSecret ++ - tokenUrl ++ type: object + params: + additionalProperties: + items: diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-probes.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-probes.yaml.patch new file mode 100644 index 000000000..788e35c9b --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/crds/crd-probes.yaml.patch @@ -0,0 +1,172 @@ +--- charts-original/crds/crd-probes.yaml ++++ charts/crds/crd-probes.yaml +@@ -1,4 +1,4 @@ +-# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml ++# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml + + --- + apiVersion: apiextensions.k8s.io/v1 +@@ -40,6 +40,33 @@ + description: Specification of desired Ingress selection for target discovery + by Prometheus. + properties: ++ authorization: ++ description: Authorization section for this endpoint ++ properties: ++ credentials: ++ description: The secret's key that contains the credentials of ++ the request ++ properties: ++ key: ++ description: The key of the secret to select from. Must be ++ a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must be ++ defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: ++ description: Set the authentication type. Defaults to Bearer, ++ Basic will cause an error ++ type: string ++ type: object + basicAuth: + description: 'BasicAuth allow an endpoint to authenticate over basic + authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint' +@@ -109,11 +136,109 @@ + jobName: + description: The job name assigned to scraped metrics by default. + type: string ++ labelLimit: ++ description: Per-scrape limit on number of labels that will be accepted ++ for a sample. Only valid in Prometheus versions 2.27.0 and newer. ++ format: int64 ++ type: integer ++ labelNameLengthLimit: ++ description: Per-scrape limit on length of labels name that will be ++ accepted for a sample. Only valid in Prometheus versions 2.27.0 ++ and newer. ++ format: int64 ++ type: integer ++ labelValueLengthLimit: ++ description: Per-scrape limit on length of labels value that will ++ be accepted for a sample. Only valid in Prometheus versions 2.27.0 ++ and newer. ++ format: int64 ++ type: integer + module: + description: 'The module to use for probing specifying how to probe + the target. Example module configuring in the blackbox exporter: + https://github.com/prometheus/blackbox_exporter/blob/master/example.yml' + type: string ++ oauth2: ++ description: OAuth2 for the URL. Only valid in Prometheus versions ++ 2.27.0 and newer. ++ properties: ++ clientId: ++ description: The secret or configmap containing the OAuth2 client ++ id ++ properties: ++ configMap: ++ description: ConfigMap containing data to use for the targets. ++ properties: ++ key: ++ description: The key to select. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the ConfigMap or its key ++ must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ secret: ++ description: Secret containing data to use for the targets. ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: object ++ clientSecret: ++ description: The secret containing the OAuth2 client secret ++ properties: ++ key: ++ description: The key of the secret to select from. Must be ++ a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must be ++ defined ++ type: boolean ++ required: ++ - key ++ type: object ++ endpointParams: ++ additionalProperties: ++ type: string ++ description: Parameters to append to the token URL ++ type: object ++ scopes: ++ description: OAuth2 scopes used for the token request ++ items: ++ type: string ++ type: array ++ tokenUrl: ++ description: The URL to fetch the token from ++ minLength: 1 ++ type: string ++ required: ++ - clientId ++ - clientSecret ++ - tokenUrl ++ type: object + prober: + description: Specification for the prober to use for probing targets. + The prober.URL parameter is required. Targets cannot be probed if +@@ -134,9 +259,19 @@ + required: + - url + type: object ++ sampleLimit: ++ description: SampleLimit defines per-scrape limit on number of scraped ++ samples that will be accepted. ++ format: int64 ++ type: integer + scrapeTimeout: + description: Timeout for scraping metrics from the Prometheus exporter. + type: string ++ targetLimit: ++ description: TargetLimit defines a limit on the number of scraped ++ targets that will be accepted. ++ format: int64 ++ type: integer + targets: + description: Targets defines a set of static and/or dynamically discovered + targets to be probed using the prober. diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheuses.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheuses.yaml.patch new file mode 100644 index 000000000..050b46cf5 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheuses.yaml.patch @@ -0,0 +1,400 @@ +--- charts-original/crds/crd-prometheuses.yaml ++++ charts/crds/crd-prometheuses.yaml +@@ -1,4 +1,4 @@ +-# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml ++# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml + + --- + apiVersion: apiextensions.k8s.io/v1 +@@ -739,6 +739,35 @@ + description: Version of the Alertmanager API that Prometheus + uses to send alerts. It can be "v1" or "v2". + type: string ++ authorization: ++ description: Authorization section for this alertmanager ++ endpoint ++ properties: ++ credentials: ++ description: The secret's key that contains the credentials ++ of the request ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key ++ must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: ++ description: Set the authentication type. Defaults to ++ Bearer, Basic will cause an error ++ type: string ++ type: object + bearerTokenFile: + description: BearerTokenFile to read from filesystem to + use when authenticating to Alertmanager. +@@ -920,6 +949,37 @@ + inside of the cluster and will discover API servers automatically + and use the pod's CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/. + properties: ++ authorization: ++ description: Authorization section for accessing apiserver ++ properties: ++ credentials: ++ description: The secret's key that contains the credentials ++ of the request ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ credentialsFile: ++ description: File to read a secret from, mutually exclusive ++ with Credentials (from SafeAuthorization) ++ type: string ++ type: ++ description: Set the authentication type. Defaults to Bearer, ++ Basic will cause an error ++ type: string ++ type: object + basicAuth: + description: BasicAuth allow an endpoint to authenticate over + basic authentication +@@ -2213,6 +2273,27 @@ + items: + type: string + type: array ++ enforcedLabelLimit: ++ description: 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. ++ format: int64 ++ type: integer ++ enforcedLabelNameLengthLimit: ++ description: 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. ++ format: int64 ++ type: integer ++ enforcedLabelValueLengthLimit: ++ description: 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. ++ format: int64 ++ type: integer + enforcedNamespaceLabel: + description: "EnforcedNamespaceLabel If set, a label will be added + to \n 1. all user-metrics (created by `ServiceMonitor`, `PodMonitor` +@@ -2233,11 +2314,13 @@ + type: integer + enforcedTargetLimit: + description: 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 overall number of targets under the desired +- limit. Note that if TargetLimit is higher that value will be taken +- instead. ++ 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. + format: int64 + type: integer + evaluationInterval: +@@ -3659,6 +3742,37 @@ + description: RemoteReadSpec defines the remote_read configuration + for prometheus. + properties: ++ authorization: ++ description: Authorization section for remote read ++ properties: ++ credentials: ++ description: The secret's key that contains the credentials ++ of the request ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ credentialsFile: ++ description: File to read a secret from, mutually exclusive ++ with Credentials (from SafeAuthorization) ++ type: string ++ type: ++ description: Set the authentication type. Defaults to Bearer, ++ Basic will cause an error ++ type: string ++ type: object + basicAuth: + description: BasicAuth for the URL. + properties: +@@ -3713,6 +3827,90 @@ + to differentiate read configurations. Only valid in Prometheus + versions 2.15.0 and newer. + type: string ++ oauth2: ++ description: OAuth2 for the URL. Only valid in Prometheus versions ++ 2.27.0 and newer. ++ properties: ++ clientId: ++ description: The secret or configmap containing the OAuth2 ++ client id ++ properties: ++ configMap: ++ description: ConfigMap containing data to use for the ++ targets. ++ properties: ++ key: ++ description: The key to select. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the ConfigMap or its ++ key must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ secret: ++ description: Secret containing data to use for the targets. ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key ++ must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: object ++ clientSecret: ++ description: The secret containing the OAuth2 client secret ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ endpointParams: ++ additionalProperties: ++ type: string ++ description: Parameters to append to the token URL ++ type: object ++ scopes: ++ description: OAuth2 scopes used for the token request ++ items: ++ type: string ++ type: array ++ tokenUrl: ++ description: The URL to fetch the token from ++ minLength: 1 ++ type: string ++ required: ++ - clientId ++ - clientSecret ++ - tokenUrl ++ type: object + proxyUrl: + description: Optional ProxyURL + type: string +@@ -3870,6 +4068,37 @@ + description: RemoteWriteSpec defines the remote_write configuration + for prometheus. + properties: ++ authorization: ++ description: Authorization section for remote write ++ properties: ++ credentials: ++ description: The secret's key that contains the credentials ++ of the request ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ credentialsFile: ++ description: File to read a secret from, mutually exclusive ++ with Credentials (from SafeAuthorization) ++ type: string ++ type: ++ description: Set the authentication type. Defaults to Bearer, ++ Basic will cause an error ++ type: string ++ type: object + basicAuth: + description: BasicAuth for the URL. + properties: +@@ -3945,6 +4174,90 @@ + to differentiate queues. Only valid in Prometheus versions + 2.15.0 and newer. + type: string ++ oauth2: ++ description: OAuth2 for the URL. Only valid in Prometheus versions ++ 2.27.0 and newer. ++ properties: ++ clientId: ++ description: The secret or configmap containing the OAuth2 ++ client id ++ properties: ++ configMap: ++ description: ConfigMap containing data to use for the ++ targets. ++ properties: ++ key: ++ description: The key to select. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the ConfigMap or its ++ key must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ secret: ++ description: Secret containing data to use for the targets. ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key ++ must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: object ++ clientSecret: ++ description: The secret containing the OAuth2 client secret ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ endpointParams: ++ additionalProperties: ++ type: string ++ description: Parameters to append to the token URL ++ type: object ++ scopes: ++ description: OAuth2 scopes used for the token request ++ items: ++ type: string ++ type: array ++ tokenUrl: ++ description: The URL to fetch the token from ++ minLength: 1 ++ type: string ++ required: ++ - clientId ++ - clientSecret ++ - tokenUrl ++ type: object + proxyUrl: + description: Optional ProxyURL + type: string +@@ -3987,6 +4300,12 @@ + remoteTimeout: + description: Timeout for requests to the remote write endpoint. + type: string ++ sendExemplars: ++ description: Enables sending of exemplars over remote write. ++ Note that exemplar-storage itself must be enabled using the ++ enableFeature option for exemplars to be scraped in the first ++ place. Only valid in Prometheus versions 2.27.0 and newer. ++ type: boolean + tlsConfig: + description: TLS Config to use for remote write. + properties: diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheusrules.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheusrules.yaml.patch new file mode 100644 index 000000000..e4aa9ffd4 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/crds/crd-prometheusrules.yaml.patch @@ -0,0 +1,17 @@ +--- charts-original/crds/crd-prometheusrules.yaml ++++ charts/crds/crd-prometheusrules.yaml +@@ -1,4 +1,4 @@ +-# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml ++# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml + + --- + apiVersion: apiextensions.k8s.io/v1 +@@ -11,6 +11,8 @@ + spec: + group: monitoring.coreos.com + names: ++ categories: ++ - prometheus-operator + kind: PrometheusRule + listKind: PrometheusRuleList + plural: prometheusrules diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-servicemonitors.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-servicemonitors.yaml.patch new file mode 100644 index 000000000..b8fb7057b --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/crds/crd-servicemonitors.yaml.patch @@ -0,0 +1,157 @@ +--- charts-original/crds/crd-servicemonitors.yaml ++++ charts/crds/crd-servicemonitors.yaml +@@ -1,4 +1,4 @@ +-# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml ++# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml + + --- + apiVersion: apiextensions.k8s.io/v1 +@@ -46,6 +46,33 @@ + description: Endpoint defines a scrapeable endpoint serving Prometheus + metrics. + properties: ++ authorization: ++ description: Authorization section for this endpoint ++ properties: ++ credentials: ++ description: The secret's key that contains the credentials ++ of the request ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: ++ description: Set the authentication type. Defaults to Bearer, ++ Basic will cause an error ++ type: string ++ type: object + basicAuth: + description: 'BasicAuth allow an endpoint to authenticate over + basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints' +@@ -169,6 +196,90 @@ + type: string + type: object + type: array ++ oauth2: ++ description: OAuth2 for the URL. Only valid in Prometheus versions ++ 2.27.0 and newer. ++ properties: ++ clientId: ++ description: The secret or configmap containing the OAuth2 ++ client id ++ properties: ++ configMap: ++ description: ConfigMap containing data to use for the ++ targets. ++ properties: ++ key: ++ description: The key to select. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the ConfigMap or its ++ key must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ secret: ++ description: Secret containing data to use for the targets. ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, ++ uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key ++ must be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ type: object ++ clientSecret: ++ description: The secret containing the OAuth2 client secret ++ properties: ++ key: ++ description: The key of the secret to select from. Must ++ be a valid secret key. ++ type: string ++ name: ++ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names ++ TODO: Add other useful fields. apiVersion, kind, uid?' ++ type: string ++ optional: ++ description: Specify whether the Secret or its key must ++ be defined ++ type: boolean ++ required: ++ - key ++ type: object ++ endpointParams: ++ additionalProperties: ++ type: string ++ description: Parameters to append to the token URL ++ type: object ++ scopes: ++ description: OAuth2 scopes used for the token request ++ items: ++ type: string ++ type: array ++ tokenUrl: ++ description: The URL to fetch the token from ++ minLength: 1 ++ type: string ++ required: ++ - clientId ++ - clientSecret ++ - tokenUrl ++ type: object + params: + additionalProperties: + items: +@@ -384,6 +495,23 @@ + \n Default & fallback value: the name of the respective Kubernetes + `Endpoint`." + type: string ++ labelLimit: ++ description: Per-scrape limit on number of labels that will be accepted ++ for a sample. Only valid in Prometheus versions 2.27.0 and newer. ++ format: int64 ++ type: integer ++ labelNameLengthLimit: ++ description: Per-scrape limit on length of labels name that will be ++ accepted for a sample. Only valid in Prometheus versions 2.27.0 ++ and newer. ++ format: int64 ++ type: integer ++ labelValueLengthLimit: ++ description: Per-scrape limit on length of labels value that will ++ be accepted for a sample. Only valid in Prometheus versions 2.27.0 ++ and newer. ++ format: int64 ++ type: integer + namespaceSelector: + description: Selector to select which namespaces the Kubernetes Endpoints + objects are discovered from. diff --git a/packages/rancher-monitoring/generated-changes/patch/crds/crd-thanosrulers.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/crds/crd-thanosrulers.yaml.patch new file mode 100644 index 000000000..1b584a648 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/crds/crd-thanosrulers.yaml.patch @@ -0,0 +1,8 @@ +--- charts-original/crds/crd-thanosrulers.yaml ++++ charts/crds/crd-thanosrulers.yaml +@@ -1,4 +1,4 @@ +-# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml ++# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml + + --- + apiVersion: apiextensions.k8s.io/v1 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rancher-monitoring/generated-changes/patch/templates/_helpers.tpl.patch index 3629a5519..82f37d0b9 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/_helpers.tpl.patch @@ -140,3 +140,41 @@ app.kubernetes.io/part-of: {{ template "kube-prometheus-stack.name" . }} chart: {{ template "kube-prometheus-stack.chartref" . }} release: {{ $.Release.Name | quote }} +@@ -97,18 +224,13 @@ + {{- end -}} + + {{/* Allow KubeVersion to be overridden. */}} +-{{- define "kube-prometheus-stack.ingress.kubeVersion" -}} +- {{- $kubeVersion := default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} +- {{/* Special use case for Amazon EKS, Google GKE */}} +- {{- if and (regexMatch "\\d+\\.\\d+\\.\\d+-(?:eks|gke).+" $kubeVersion) (not .Values.kubeVersionOverride) -}} +- {{- $kubeVersion = regexFind "\\d+\\.\\d+\\.\\d+" $kubeVersion -}} +- {{- end -}} +- {{- $kubeVersion -}} ++{{- define "kube-prometheus-stack.kubeVersion" -}} ++ {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}} + {{- end -}} + + {{/* Get Ingress API Version */}} + {{- define "kube-prometheus-stack.ingress.apiVersion" -}} +- {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19.x" (include "kube-prometheus-stack.ingress.kubeVersion" .)) -}} ++ {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "kube-prometheus-stack.kubeVersion" .)) -}} + {{- print "networking.k8s.io/v1" -}} + {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} + {{- print "networking.k8s.io/v1beta1" -}} +@@ -125,5 +247,14 @@ + {{/* Check Ingress supports pathType */}} + {{/* pathType was added to networking.k8s.io/v1beta1 in Kubernetes 1.18 */}} + {{- define "kube-prometheus-stack.ingress.supportsPathType" -}} +- {{- or (eq (include "kube-prometheus-stack.ingress.isStable" .) "true") (and (eq (include "kube-prometheus-stack.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18.x" (include "kube-prometheus-stack.ingress.kubeVersion" .))) -}} ++ {{- or (eq (include "kube-prometheus-stack.ingress.isStable" .) "true") (and (eq (include "kube-prometheus-stack.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "kube-prometheus-stack.kubeVersion" .))) -}} ++{{- end -}} ++ ++{{/* Get Policy API Version */}} ++{{- define "kube-prometheus-stack.pdb.apiVersion" -}} ++ {{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" (include "kube-prometheus-stack.kubeVersion" .)) -}} ++ {{- print "policy/v1" -}} ++ {{- else -}} ++ {{- print "policy/v1beta1" -}} ++ {{- end -}} + {{- end -}} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch new file mode 100644 index 000000000..567c0cefa --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/ingress.yaml.patch @@ -0,0 +1,9 @@ +--- charts-original/templates/alertmanager/ingress.yaml ++++ charts/templates/alertmanager/ingress.yaml +@@ -1,5 +1,5 @@ + {{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled }} +-{{- $pathType := .Values.alertmanager.ingress.pathType | default "" }} ++{{- $pathType := .Values.alertmanager.ingress.pathType | default "ImplementationSpecific" }} + {{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "alertmanager" }} + {{- $servicePort := .Values.alertmanager.service.port -}} + {{- $routePrefix := list .Values.alertmanager.alertmanagerSpec.routePrefix }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch new file mode 100644 index 000000000..259df9344 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/templates/alertmanager/podDisruptionBudget.yaml.patch @@ -0,0 +1,9 @@ +--- charts-original/templates/alertmanager/podDisruptionBudget.yaml ++++ charts/templates/alertmanager/podDisruptionBudget.yaml +@@ -1,5 +1,5 @@ + {{- if and .Values.alertmanager.enabled .Values.alertmanager.podDisruptionBudget.enabled }} +-apiVersion: policy/v1beta1 ++apiVersion: {{ include "kube-prometheus-stack.pdb.apiVersion" . }} + kind: PodDisruptionBudget + metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/apiserver.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/apiserver.yaml.patch index 6a2e763ec..c143f7902 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/apiserver.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/apiserver.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "apiserver" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1662,7 +1662,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch index 6355241d7..1fd246c72 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/cluster-total.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "cluster-total" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1823,7 +1823,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/controller-manager.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/controller-manager.yaml.patch index c12f208c0..54dcf2915 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/controller-manager.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/controller-manager.yaml.patch @@ -133,6 +133,15 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", +@@ -1092,7 +1097,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, @@ -1126,7 +1131,7 @@ "options": [ diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/etcd.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/etcd.yaml.patch index 2d2b35a18..a18fb3c28 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/etcd.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/etcd.yaml.patch @@ -15,6 +15,15 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1061,7 +1062,7 @@ + "value": "prod" + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if (or .Values.grafana.sidecar.dashboards.multicluster.global.enabled .Values.grafana.sidecar.dashboards.multicluster.etcd.enabled) }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, @@ -1113,4 +1114,5 @@ "title": "etcd", "version": 215 diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml.patch index d5119291a..f983987ea 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -2965,7 +2965,7 @@ + "value": "" + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch index 3ce475b39..27a23c3b0 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -2658,7 +2658,7 @@ + "value": "" + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch index 262ac9081..0dd0d5387 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-node.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-node" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -892,7 +892,7 @@ + "value": "" + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch index 68241b00b..442090c20 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -2314,7 +2314,7 @@ + "value": "" + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch index 5d91141fc..b8c5206de 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1846,7 +1846,7 @@ + "value": "" + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch index 2f7abde96..a5bdfd5c5 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml.patch @@ -9,3 +9,12 @@ 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 }} +@@ -2033,7 +2033,7 @@ + "value": "" + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/kubelet.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/kubelet.yaml.patch index 6748744e8..7610d3ae5 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/kubelet.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/kubelet.yaml.patch @@ -15,6 +15,15 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "kubelet" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -2163,7 +2164,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, @@ -2197,7 +2198,7 @@ "options": [ diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch index e2e2d07d0..81533307c 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-pod.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "namespace-by-pod" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1293,7 +1293,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch index 35ebc6fcf..cd051e374 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/namespace-by-workload.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "namespace-by-workload" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1533,7 +1533,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml.patch index cd85c57ef..9f124ee2e 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml.patch @@ -9,3 +9,989 @@ 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 }} +@@ -21,23 +21,30 @@ + data: + node-cluster-rsrc-use.json: |- + { ++ "__inputs": [ ++ ++ ], ++ "__requires": [ ++ ++ ], + "annotations": { + "list": [ + + ] + }, +- "editable": true, ++ "editable": false, + "gnetId": null, +- "graphTooltip": 0, ++ "graphTooltip": 1, + "hideControls": false, ++ "id": null, + "links": [ + + ], +- "refresh": "10s", ++ "refresh": "30s", + "rows": [ + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -48,26 +55,34 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 1, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 2, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], +@@ -77,12 +92,11 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "(\n instance:node_cpu_utilisation:rate5m{job=\"node-exporter\"}\n*\n instance:node_num_cpu:sum{job=\"node-exporter\"}\n)\n/ scalar(sum(instance:node_num_cpu:sum{job=\"node-exporter\"}))\n", ++ "expr": "((\n instance:node_cpu_utilisation:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}\n *\n instance:node_num_cpu:sum{job=\"node-exporter\", cluster=\"$cluster\"}\n) != 0 )\n/ scalar(sum(instance:node_num_cpu:sum{job=\"node-exporter\", cluster=\"$cluster\"}))\n", + "format": "time_series", + "intervalFactor": 2, +- "legendFormat": "{{`{{`}}instance{{`}}`}}", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "legendFormat": "{{`{{`}} instance {{`}}`}}", ++ "refId": "A" + } + ], + "thresholds": [ +@@ -92,8 +106,8 @@ + "timeShift": null, + "title": "CPU Utilisation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -111,17 +125,17 @@ + "format": "percentunit", + "label": null, + "logBase": 1, +- "max": 1, +- "min": 0, ++ "max": null, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + }, +@@ -134,26 +148,34 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 2, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 3, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], +@@ -163,12 +185,11 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_load1_per_cpu:ratio{job=\"node-exporter\"}\n/ scalar(count(instance:node_load1_per_cpu:ratio{job=\"node-exporter\"}))\n", ++ "expr": "(\n instance:node_load1_per_cpu:ratio{job=\"node-exporter\", cluster=\"$cluster\"}\n / scalar(count(instance:node_load1_per_cpu:ratio{job=\"node-exporter\", cluster=\"$cluster\"}))\n) != 0\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}}", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -176,10 +197,10 @@ + ], + "timeFrom": null, + "timeShift": null, +- "title": "CPU Saturation (load1 per CPU)", ++ "title": "CPU Saturation (Load1 per CPU)", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -197,17 +218,17 @@ + "format": "percentunit", + "label": null, + "logBase": 1, +- "max": 1, +- "min": 0, ++ "max": null, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -217,11 +238,12 @@ + "repeatRowId": null, + "showTitle": true, + "title": "CPU", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + }, + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -232,26 +254,34 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 3, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 4, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], +@@ -261,12 +291,11 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_memory_utilisation:ratio{job=\"node-exporter\"}\n/ scalar(count(instance:node_memory_utilisation:ratio{job=\"node-exporter\"}))\n", ++ "expr": "(\n instance:node_memory_utilisation:ratio{job=\"node-exporter\", cluster=\"$cluster\"}\n / scalar(count(instance:node_memory_utilisation:ratio{job=\"node-exporter\", cluster=\"$cluster\"}))\n) != 0\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}}", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -276,8 +305,8 @@ + "timeShift": null, + "title": "Memory Utilisation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -295,17 +324,17 @@ + "format": "percentunit", + "label": null, + "logBase": 1, +- "max": 1, +- "min": 0, ++ "max": null, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + }, +@@ -318,26 +347,34 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 4, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 5, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], +@@ -347,12 +384,11 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_vmstat_pgmajfault:rate5m{job=\"node-exporter\"}", ++ "expr": "instance:node_vmstat_pgmajfault:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}}", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -362,8 +398,8 @@ + "timeShift": null, + "title": "Memory Saturation (Major Page Faults)", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -378,20 +414,20 @@ + }, + "yaxes": [ + { +- "format": "rps", ++ "format": "rds", + "label": null, + "logBase": 1, + "max": null, +- "min": 0, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "rds", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -401,11 +437,12 @@ + "repeatRowId": null, + "showTitle": true, + "title": "Memory", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + }, + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -416,33 +453,41 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 5, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 6, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + { +- "alias": "/ Receive/", ++ "alias": "/Receive/", + "stack": "A" + }, + { +- "alias": "/ Transmit/", ++ "alias": "/Transmit/", + "stack": "B", + "transform": "negative-Y" + } +@@ -453,20 +498,18 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_network_receive_bytes_excluding_lo:rate5m{job=\"node-exporter\"}", ++ "expr": "instance:node_network_receive_bytes_excluding_lo:rate5m{job=\"node-exporter\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Receive", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "A" + }, + { +- "expr": "instance:node_network_transmit_bytes_excluding_lo:rate5m{job=\"node-exporter\"}", ++ "expr": "instance:node_network_transmit_bytes_excluding_lo:rate5m{job=\"node-exporter\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Transmit", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "B" + } + ], + "thresholds": [ +@@ -474,10 +517,10 @@ + ], + "timeFrom": null, + "timeShift": null, +- "title": "Net Utilisation (Bytes Receive/Transmit)", ++ "title": "Network Utilisation (Bytes Receive/Transmit)", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -500,12 +543,12 @@ + "show": true + }, + { +- "format": "short", ++ "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + }, +@@ -518,26 +561,34 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 6, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 7, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + { + "alias": "/ Receive/", +@@ -555,20 +606,18 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_network_receive_drop_excluding_lo:rate5m{job=\"node-exporter\"}", ++ "expr": "instance:node_network_receive_drop_excluding_lo:rate5m{job=\"node-exporter\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Receive", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "A" + }, + { +- "expr": "instance:node_network_transmit_drop_excluding_lo:rate5m{job=\"node-exporter\"}", ++ "expr": "instance:node_network_transmit_drop_excluding_lo:rate5m{job=\"node-exporter\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} Transmit", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "B" + } + ], + "thresholds": [ +@@ -576,10 +625,10 @@ + ], + "timeFrom": null, + "timeShift": null, +- "title": "Net Saturation (Drops Receive/Transmit)", ++ "title": "Network Saturation (Drops Receive/Transmit)", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -594,7 +643,7 @@ + }, + "yaxes": [ + { +- "format": "rps", ++ "format": "Bps", + "label": null, + "logBase": 1, + "max": null, +@@ -602,12 +651,12 @@ + "show": true + }, + { +- "format": "short", ++ "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -617,11 +666,12 @@ + "repeatRowId": null, + "showTitle": true, + "title": "Network", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + }, + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -632,26 +682,34 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 7, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 8, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], +@@ -661,12 +719,11 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\"}))\n", ++ "expr": "(\n instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}\n / scalar(count(instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}))\n) != 0\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}device{{`}}`}}", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -676,8 +733,8 @@ + "timeShift": null, + "title": "Disk IO Utilisation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -695,17 +752,17 @@ + "format": "percentunit", + "label": null, + "logBase": 1, +- "max": 1, +- "min": 0, ++ "max": null, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + }, +@@ -718,26 +775,34 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 8, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 9, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], +@@ -747,12 +812,11 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\"}))\n", ++ "expr": "(\n instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}\n / scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}))\n) != 0\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}device{{`}}`}}", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -762,8 +826,8 @@ + "timeShift": null, + "title": "Disk IO Saturation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -781,17 +845,17 @@ + "format": "percentunit", + "label": null, + "logBase": 1, +- "max": 1, +- "min": 0, ++ "max": null, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -801,11 +865,12 @@ + "repeatRowId": null, + "showTitle": true, + "title": "Disk IO", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + }, + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -816,26 +881,34 @@ + "dashes": false, + "datasource": "$datasource", + "fill": 10, +- "id": 9, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 10, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, +- "linewidth": 0, ++ "linewidth": 1, + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], +@@ -845,12 +918,11 @@ + "steppedLine": false, + "targets": [ + { +- "expr": "sum without (device) (\n max without (fstype, mountpoint) (\n node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"} - node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\"}\n )\n) \n/ scalar(sum(max without (fstype, mountpoint) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"})))\n", ++ "expr": "sum without (device) (\n max without (fstype, mountpoint) ((\n node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", cluster=\"$cluster\"}\n -\n node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\", cluster=\"$cluster\"}\n ) != 0)\n)\n/ scalar(sum(max without (fstype, mountpoint) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", cluster=\"$cluster\"})))\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}instance{{`}}`}}", +- "legendLink": "/dashboard/file/node-rsrc-use.json", +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -860,8 +932,8 @@ + "timeShift": null, + "title": "Disk Space Utilisation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -879,17 +951,17 @@ + "format": "percentunit", + "label": null, + "logBase": 1, +- "max": 1, +- "min": 0, ++ "max": null, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -899,20 +971,21 @@ + "repeatRowId": null, + "showTitle": true, + "title": "Disk Space", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ +- ++ "node-exporter-mixin" + ], + "templating": { + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, + "label": null, +@@ -924,6 +997,33 @@ + "refresh": 1, + "regex": "", + "type": "datasource" ++ }, ++ { ++ "allValue": null, ++ "current": { ++ "text": "", ++ "value": "" ++ }, ++ "datasource": "$datasource", ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, ++ "includeAll": false, ++ "label": null, ++ "multi": false, ++ "name": "cluster", ++ "options": [ ++ ++ ], ++ "query": "label_values(node_time_seconds, cluster)", ++ "refresh": 2, ++ "regex": "", ++ "sort": 1, ++ "tagValuesQuery": "", ++ "tags": [ ++ ++ ], ++ "tagsQuery": "", ++ "type": "query", ++ "useTags": false + } + ] + }, +@@ -957,8 +1057,7 @@ + ] + }, + "timezone": "utc", +- "title": "USE Method / Cluster", +- "uid": "", ++ "title": "Node Exporter / USE Method / Cluster", + "version": 0 + } + {{- end }} +\ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-rsrc-use.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-rsrc-use.yaml.patch index f514e83ec..89e41271f 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-rsrc-use.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/node-rsrc-use.yaml.patch @@ -9,3 +9,1026 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "node-rsrc-use" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -21,23 +21,30 @@ + data: + node-rsrc-use.json: |- + { ++ "__inputs": [ ++ ++ ], ++ "__requires": [ ++ ++ ], + "annotations": { + "list": [ + + ] + }, +- "editable": true, ++ "editable": false, + "gnetId": null, +- "graphTooltip": 0, ++ "graphTooltip": 1, + "hideControls": false, ++ "id": null, + "links": [ + + ], +- "refresh": "10s", ++ "refresh": "30s", + "rows": [ + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -47,14 +54,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 1, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 2, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": false, + "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -63,26 +77,26 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_cpu_utilisation:rate5m{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance:node_cpu_utilisation:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Utilisation", +- "legendLink": null, +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -92,8 +106,8 @@ + "timeShift": null, + "title": "CPU Utilisation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -112,16 +126,16 @@ + "label": null, + "logBase": 1, + "max": null, +- "min": 0, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + }, +@@ -133,14 +147,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 2, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 3, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": false, + "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -149,26 +170,26 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_load1_per_cpu:ratio{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance:node_load1_per_cpu:ratio{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Saturation", +- "legendLink": null, +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -178,8 +199,8 @@ + "timeShift": null, + "title": "CPU Saturation (Load1 per CPU)", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -198,16 +219,16 @@ + "label": null, + "logBase": 1, + "max": null, +- "min": 0, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -217,11 +238,12 @@ + "repeatRowId": null, + "showTitle": true, + "title": "CPU", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + }, + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -231,14 +253,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 3, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 4, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -247,26 +276,26 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_memory_utilisation:ratio{job=\"node-exporter\", job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance:node_memory_utilisation:ratio{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, +- "legendFormat": "Memory", +- "legendLink": null, +- "step": 10 ++ "legendFormat": "Utilisation", ++ "refId": "A" + } + ], + "thresholds": [ +@@ -276,8 +305,8 @@ + "timeShift": null, + "title": "Memory Utilisation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -296,16 +325,16 @@ + "label": null, + "logBase": 1, + "max": null, +- "min": 0, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + }, +@@ -317,14 +346,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 4, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 5, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": false, + "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -333,26 +369,26 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_vmstat_pgmajfault:rate5m{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance:node_vmstat_pgmajfault:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, +- "legendFormat": "Major page faults", +- "legendLink": null, +- "step": 10 ++ "legendFormat": "Major page Faults", ++ "refId": "A" + } + ], + "thresholds": [ +@@ -362,8 +398,8 @@ + "timeShift": null, + "title": "Memory Saturation (Major Page Faults)", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -378,20 +414,20 @@ + }, + "yaxes": [ + { +- "format": "short", ++ "format": "rds", + "label": null, + "logBase": 1, + "max": null, +- "min": 0, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "rds", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -401,11 +437,12 @@ + "repeatRowId": null, + "showTitle": true, + "title": "Memory", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + }, + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -415,14 +452,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 5, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 6, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -431,11 +475,12 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + { + "alias": "/Receive/", +@@ -449,24 +494,22 @@ + ], + "spaceLength": 10, + "span": 6, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_network_receive_bytes_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance:node_network_receive_bytes_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Receive", +- "legendLink": null, +- "step": 10 ++ "refId": "A" + }, + { +- "expr": "instance:node_network_transmit_bytes_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance:node_network_transmit_bytes_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Transmit", +- "legendLink": null, +- "step": 10 ++ "refId": "B" + } + ], + "thresholds": [ +@@ -474,10 +517,10 @@ + ], + "timeFrom": null, + "timeShift": null, +- "title": "Net Utilisation (Bytes Receive/Transmit)", ++ "title": "Network Utilisation (Bytes Receive/Transmit)", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -500,12 +543,12 @@ + "show": true + }, + { +- "format": "short", ++ "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + }, +@@ -517,14 +560,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 6, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 7, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -533,42 +583,41 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + { +- "alias": "/Receive/", ++ "alias": "/ Receive/", + "stack": "A" + }, + { +- "alias": "/Transmit/", ++ "alias": "/ Transmit/", + "stack": "B", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "span": 6, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "instance:node_network_receive_drop_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance:node_network_receive_drop_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, +- "legendFormat": "Receive drops", +- "legendLink": null, +- "step": 10 ++ "legendFormat": "Receive", ++ "refId": "A" + }, + { +- "expr": "instance:node_network_transmit_drop_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance:node_network_transmit_drop_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, +- "legendFormat": "Transmit drops", +- "legendLink": null, +- "step": 10 ++ "legendFormat": "Transmit", ++ "refId": "B" + } + ], + "thresholds": [ +@@ -576,10 +625,10 @@ + ], + "timeFrom": null, + "timeShift": null, +- "title": "Net Saturation (Drops Receive/Transmit)", ++ "title": "Network Saturation (Drops Receive/Transmit)", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -594,7 +643,7 @@ + }, + "yaxes": [ + { +- "format": "rps", ++ "format": "Bps", + "label": null, + "logBase": 1, + "max": null, +@@ -602,12 +651,12 @@ + "show": true + }, + { +- "format": "short", ++ "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -616,12 +665,13 @@ + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, +- "title": "Net", +- "titleSize": "h6" ++ "title": "Network", ++ "titleSize": "h6", ++ "type": "row" + }, + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -631,14 +681,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 7, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 8, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -647,26 +704,26 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}device{{`}}`}}", +- "legendLink": null, +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -676,8 +733,8 @@ + "timeShift": null, + "title": "Disk IO Utilisation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -696,16 +753,16 @@ + "label": null, + "logBase": 1, + "max": null, +- "min": 0, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + }, +@@ -717,14 +774,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 8, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 9, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, +- "show": true, ++ "rightSide": false, ++ "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -733,26 +797,26 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 6, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\", instance=\"$instance\"}", ++ "expr": "instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}device{{`}}`}}", +- "legendLink": null, +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -762,8 +826,8 @@ + "timeShift": null, + "title": "Disk IO Saturation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -782,16 +846,16 @@ + "label": null, + "logBase": 1, + "max": null, +- "min": 0, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -801,11 +865,12 @@ + "repeatRowId": null, + "showTitle": true, + "title": "Disk IO", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + }, + { + "collapse": false, +- "height": "250px", ++ "collapsed": false, + "panels": [ + { + "aliasColors": { +@@ -815,14 +880,21 @@ + "dashLength": 10, + "dashes": false, + "datasource": "$datasource", +- "fill": 1, +- "id": 9, ++ "fill": 10, ++ "fillGradient": 0, ++ "gridPos": { ++ ++ }, ++ "id": 10, + "legend": { ++ "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, ++ "rightSide": false, + "show": false, ++ "sideWidth": null, + "total": false, + "values": false + }, +@@ -831,26 +903,26 @@ + "links": [ + + ], +- "nullPointMode": "null as zero", ++ "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", ++ "repeat": null, + "seriesOverrides": [ + + ], + "spaceLength": 10, + "span": 12, +- "stack": false, ++ "stack": true, + "steppedLine": false, + "targets": [ + { +- "expr": "1 -\n(\n max without (mountpoint, fstype) (node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\"})\n/\n max without (mountpoint, fstype) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\"})\n)\n", ++ "expr": "sort_desc(1 -\n (\n max without (mountpoint, fstype) (node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\", cluster=\"$cluster\"})\n /\n max without (mountpoint, fstype) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\", cluster=\"$cluster\"})\n ) != 0\n)\n", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{`}}device{{`}}`}}", +- "legendLink": null, +- "step": 10 ++ "refId": "A" + } + ], + "thresholds": [ +@@ -860,8 +932,8 @@ + "timeShift": null, + "title": "Disk Space Utilisation", + "tooltip": { +- "shared": false, +- "sort": 0, ++ "shared": true, ++ "sort": 2, + "value_type": "individual" + }, + "type": "graph", +@@ -880,16 +952,16 @@ + "label": null, + "logBase": 1, + "max": null, +- "min": 0, ++ "min": null, + "show": true + }, + { +- "format": "short", ++ "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, +- "show": false ++ "show": true + } + ] + } +@@ -899,20 +971,21 @@ + "repeatRowId": null, + "showTitle": true, + "title": "Disk Space", +- "titleSize": "h6" ++ "titleSize": "h6", ++ "type": "row" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ +- ++ "node-exporter-mixin" + ], + "templating": { + "list": [ + { + "current": { +- "text": "default", +- "value": "default" ++ "text": "Prometheus", ++ "value": "Prometheus" + }, + "hide": 0, + "label": null, +@@ -928,22 +1001,48 @@ + { + "allValue": null, + "current": { +- "text": "prod", +- "value": "prod" ++ "text": "", ++ "value": "" ++ }, ++ "datasource": "$datasource", ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, ++ "includeAll": false, ++ "label": null, ++ "multi": false, ++ "name": "cluster", ++ "options": [ ++ ++ ], ++ "query": "label_values(node_time_seconds, cluster)", ++ "refresh": 2, ++ "regex": "", ++ "sort": 1, ++ "tagValuesQuery": "", ++ "tags": [ ++ ++ ], ++ "tagsQuery": "", ++ "type": "query", ++ "useTags": false ++ }, ++ { ++ "allValue": null, ++ "current": { ++ + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": false, +- "label": "instance", ++ "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], +- "query": "label_values(up{job=\"node-exporter\"}, instance)", +- "refresh": 1, ++ "query": "label_values(node_exporter_build_info{job=\"node-exporter\", cluster=\"$cluster\"}, instance)", ++ "refresh": 2, + "regex": "", +- "sort": 2, ++ "sort": 1, + "tagValuesQuery": "", + "tags": [ + +@@ -984,8 +1083,7 @@ + ] + }, + "timezone": "utc", +- "title": "USE Method / Node", +- "uid": "", ++ "title": "Node Exporter / USE Method / Node", + "version": 0 + } + {{- end }} +\ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/nodes.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/nodes.yaml.patch index 263330bc3..11b73f26f 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/nodes.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/nodes.yaml.patch @@ -9,3 +9,40 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -34,13 +34,13 @@ + }, + "editable": false, + "gnetId": null, +- "graphTooltip": 0, ++ "graphTooltip": 1, + "hideControls": false, + "id": null, + "links": [ + + ], +- "refresh": "", ++ "refresh": "30s", + "rows": [ + { + "collapse": false, +@@ -907,7 +907,7 @@ + "schemaVersion": 14, + "style": "dark", + "tags": [ +- ++ "node-exporter-mixin" + ], + "templating": { + "list": [ +@@ -984,8 +984,8 @@ + "30d" + ] + }, +- "timezone": "browser", +- "title": "Nodes", ++ "timezone": "utc", ++ "title": "Node Exporter / Nodes", + "version": 0 + } + {{- end }} +\ No newline at end of file diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch index e7c77d5e0..40f9c7bb6 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml.patch @@ -61,6 +61,15 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "", +@@ -466,7 +466,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, @@ -500,7 +500,7 @@ "options": [ diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch index 96bbe5747..b992a7bed 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/pod-total.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "pod-total" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1025,7 +1025,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml.patch index dc6c3bd10..b9bd0568f 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "prometheus-remote-write" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1586,7 +1586,7 @@ + } + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": true, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/proxy.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/proxy.yaml.patch index 3d47af0fe..c88af044c 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/proxy.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/proxy.yaml.patch @@ -142,6 +142,15 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", +@@ -1172,7 +1177,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, @@ -1206,7 +1211,7 @@ "options": [ diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/scheduler.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/scheduler.yaml.patch index 9467247f5..54fc03e6d 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/scheduler.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/scheduler.yaml.patch @@ -172,6 +172,15 @@ "format": "time_series", "intervalFactor": 2, "legendFormat": "{{`{{`}}instance{{`}}`}}", +@@ -1015,7 +1020,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": "cluster", + "multi": false, @@ -1049,7 +1054,7 @@ "options": [ diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch index b8a643abd..85ed66c74 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/grafana/dashboards-1.14/workload-total.yaml.patch @@ -9,3 +9,12 @@ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "workload-total" | trunc 63 | trimSuffix "-" }} annotations: {{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }} +@@ -1203,7 +1203,7 @@ + + }, + "datasource": "$datasource", +- "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster }}0{{ else }}2{{ end }}, ++ "hide": {{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}, + "includeAll": false, + "label": null, + "multi": false, diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/deployment.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/deployment.yaml.patch index 9d38bca86..d5420ced3 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/deployment.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus-operator/deployment.yaml.patch @@ -12,7 +12,7 @@ {{- end }} imagePullPolicy: "{{ .Values.prometheusOperator.image.pullPolicy }}" args: -@@ -66,9 +66,9 @@ +@@ -66,12 +66,14 @@ - --alertmanager-default-base-image={{ .Values.prometheusOperator.alertmanagerDefaultBaseImage }} {{- end }} {{- if .Values.prometheusOperator.prometheusConfigReloaderImage.sha }} @@ -22,9 +22,16 @@ - - --prometheus-config-reloader={{ .Values.prometheusOperator.prometheusConfigReloaderImage.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.tag }} + - --prometheus-config-reloader={{ template "system_default_registry" . }}{{ .Values.prometheusOperator.prometheusConfigReloaderImage.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.tag }} {{- end }} - - --config-reloader-cpu={{ .Values.prometheusOperator.configReloaderCpu }} - - --config-reloader-memory={{ .Values.prometheusOperator.configReloaderMemory }} -@@ -135,16 +135,16 @@ +- - --config-reloader-cpu={{ .Values.prometheusOperator.configReloaderCpu }} +- - --config-reloader-memory={{ .Values.prometheusOperator.configReloaderMemory }} ++ - --config-reloader-cpu-request={{ .Values.prometheusOperator.configReloaderCpu }} ++ - --config-reloader-cpu-limit={{ .Values.prometheusOperator.configReloaderCpu }} ++ - --config-reloader-memory-request={{ .Values.prometheusOperator.configReloaderMemory }} ++ - --config-reloader-memory-limit={{ .Values.prometheusOperator.configReloaderMemory }} + {{- if .Values.prometheusOperator.alertmanagerInstanceNamespaces }} + - --alertmanager-instance-namespaces={{ .Values.prometheusOperator.alertmanagerInstanceNamespaces | join "," }} + {{- end }} +@@ -135,16 +137,16 @@ hostNetwork: true dnsPolicy: ClusterFirstWithHostNet {{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch new file mode 100644 index 000000000..036c00c1e --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/ingress.yaml.patch @@ -0,0 +1,9 @@ +--- charts-original/templates/prometheus/ingress.yaml ++++ charts/templates/prometheus/ingress.yaml +@@ -1,5 +1,5 @@ + {{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled -}} +- {{- $pathType := .Values.prometheus.ingress.pathType | default "" -}} ++ {{- $pathType := .Values.prometheus.ingress.pathType | default "ImplementationSpecific" -}} + {{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" -}} + {{- $servicePort := .Values.prometheus.service.port -}} + {{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix -}} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch new file mode 100644 index 000000000..a6227ebcd --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/podDisruptionBudget.yaml.patch @@ -0,0 +1,9 @@ +--- charts-original/templates/prometheus/podDisruptionBudget.yaml ++++ charts/templates/prometheus/podDisruptionBudget.yaml +@@ -1,5 +1,5 @@ + {{- if and .Values.prometheus.enabled .Values.prometheus.podDisruptionBudget.enabled }} +-apiVersion: policy/v1beta1 ++apiVersion: {{ include "kube-prometheus-stack.pdb.apiVersion" . }} + kind: PodDisruptionBudget + metadata: + name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch index 8c06496ce..cf69d1b2a 100644 --- a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/prometheus.yaml.patch @@ -24,7 +24,18 @@ {{ toYaml .Values.prometheus.prometheusSpec.nodeSelector | indent 4 }} {{- end }} paused: {{ .Values.prometheus.prometheusSpec.paused }} -@@ -232,8 +234,8 @@ +@@ -70,6 +72,10 @@ + logFormat: {{ .Values.prometheus.prometheusSpec.logFormat }} + listenLocal: {{ .Values.prometheus.prometheusSpec.listenLocal }} + enableAdminAPI: {{ .Values.prometheus.prometheusSpec.enableAdminAPI }} ++{{- if .Values.prometheus.prometheusSpec.web }} ++ web: ++{{ toYaml .Values.prometheus.prometheusSpec.web | indent 4 }} ++{{- end }} + {{- if .Values.prometheus.prometheusSpec.enableFeatures }} + enableFeatures: + {{- range $enableFeatures := .Values.prometheus.prometheusSpec.enableFeatures }} +@@ -232,8 +238,8 @@ - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-prometheus]} {{- end }} {{- end }} @@ -34,7 +45,7 @@ {{ toYaml .Values.prometheus.prometheusSpec.tolerations | indent 4 }} {{- end }} {{- if .Values.prometheus.prometheusSpec.topologySpreadConstraints }} -@@ -272,7 +274,7 @@ +@@ -272,7 +278,7 @@ {{- end }} {{- if .Values.prometheus.prometheusSpec.containers }} containers: @@ -43,7 +54,7 @@ {{- end }} {{- if .Values.prometheus.prometheusSpec.initContainers }} initContainers: -@@ -288,6 +290,7 @@ +@@ -288,6 +294,7 @@ {{- if .Values.prometheus.prometheusSpec.disableCompaction }} disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }} {{- end }} @@ -51,7 +62,7 @@ portName: {{ .Values.prometheus.prometheusSpec.portName }} {{- end }} {{- if .Values.prometheus.prometheusSpec.volumes }} -@@ -332,3 +335,4 @@ +@@ -332,3 +339,4 @@ {{- if .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }} {{- end }} diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml.patch new file mode 100644 index 000000000..8ad384df3 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml.patch @@ -0,0 +1,18 @@ +--- charts-original/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml ++++ charts/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml +@@ -57,6 +57,7 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- if semverCompare ">=1.18.0-0" $kubeTargetVersion }} + - alert: AggregatedAPIDown + annotations: + description: An aggregated API {{`{{`}} $labels.name {{`}}`}}/{{`{{`}} $labels.namespace {{`}}`}} has been only {{`{{`}} $value | humanize {{`}}`}}% available over the last 10m. +@@ -69,6 +70,7 @@ + {{- if .Values.defaultRules.additionalRuleLabels }} + {{ toYaml .Values.defaultRules.additionalRuleLabels | indent 8 }} + {{- end }} ++{{- end }} + {{- if .Values.kubeApiServer.enabled }} + - alert: KubeAPIDown + annotations: diff --git a/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceThanosSidecarExternal.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceThanosSidecarExternal.yaml.patch new file mode 100644 index 000000000..246182a00 --- /dev/null +++ b/packages/rancher-monitoring/generated-changes/patch/templates/prometheus/serviceThanosSidecarExternal.yaml.patch @@ -0,0 +1,18 @@ +--- charts-original/templates/prometheus/serviceThanosSidecarExternal.yaml ++++ charts/templates/prometheus/serviceThanosSidecarExternal.yaml +@@ -15,6 +15,15 @@ + {{- end }} + spec: + type: {{ .Values.prometheus.thanosServiceExternal.type }} ++{{- if .Values.prometheus.thanosServiceExternal.loadBalancerIP }} ++ loadBalancerIP: {{ .Values.prometheus.thanosServiceExternal.loadBalancerIP }} ++{{- end }} ++{{- if .Values.prometheus.thanosServiceExternal.loadBalancerSourceRanges }} ++ loadBalancerSourceRanges: ++ {{- range $cidr := .Values.prometheus.thanosServiceExternal.loadBalancerSourceRanges }} ++ - {{ $cidr }} ++ {{- end }} ++{{- end }} + ports: + - name: {{ .Values.prometheus.thanosServiceExternal.portName }} + port: {{ .Values.prometheus.thanosServiceExternal.port }} diff --git a/packages/rancher-monitoring/generated-changes/patch/values.yaml.patch b/packages/rancher-monitoring/generated-changes/patch/values.yaml.patch index c364be97e..f317bac3f 100644 --- a/packages/rancher-monitoring/generated-changes/patch/values.yaml.patch +++ b/packages/rancher-monitoring/generated-changes/patch/values.yaml.patch @@ -463,103 +463,41 @@ pspEnabled: true pspAnnotations: {} ## Specify pod annotations -@@ -187,25 +625,76 @@ +@@ -187,6 +625,7 @@ ## ref: https://prometheus.io/docs/alerting/notifications/ ## https://prometheus.io/docs/alerting/notification_examples/ ## -- templateFiles: {} -- # -- ## An example template: -- # template_1.tmpl: |- -- # {{ define "cluster" }}{{ .ExternalURL | reReplaceAll ".*alertmanager\\.(.*)" "$1" }}{{ end }} -- # -- # {{ define "slack.myorg.text" }} -- # {{- $root := . -}} -- # {{ range .Alerts }} -- # *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` ++ + templateFiles: {} + # + ## An example template: +@@ -197,7 +636,7 @@ + # {{- $root := . -}} + # {{ range .Alerts }} + # *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` - # *Cluster:* {{ template "cluster" $root }} -- # *Description:* {{ .Annotations.description }} -- # *Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> -- # *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:> -- # *Details:* -- # {{ range .Labels.SortedPairs }} - *{{ .Name }}:* `{{ .Value }}` -- # {{ end }} -- # {{ end }} -- # {{ end }} -+ templateFiles: -+ rancher_defaults.tmpl: |- -+ {{- define "slack.rancher.text" -}} -+ {{ template "rancher.text_multiple" . }} -+ {{- end -}} -+ -+ {{- define "rancher.text_multiple" -}} -+ *[GROUP - Details]* -+ One or more alarms in this group have triggered a notification. -+ -+ {{- if gt (len .GroupLabels.Values) 0 }} -+ *Group Labels:* -+ {{- range .GroupLabels.SortedPairs }} -+ • *{{ .Name }}:* `{{ .Value }}` -+ {{- end }} -+ {{- end }} -+ {{- if .ExternalURL }} -+ *Link to AlertManager:* {{ .ExternalURL }} -+ {{- end }} -+ -+ {{- range .Alerts }} -+ {{ template "rancher.text_single" . }} -+ {{- end }} -+ {{- end -}} -+ -+ {{- define "rancher.text_single" -}} -+ {{- if .Labels.alertname }} -+ *[ALERT - {{ .Labels.alertname }}]* -+ {{- else }} -+ *[ALERT]* -+ {{- end }} -+ {{- if .Labels.severity }} -+ *Severity:* `{{ .Labels.severity }}` -+ {{- end }} -+ {{- if .Labels.cluster }} -+ *Cluster:* {{ .Labels.cluster }} -+ {{- end }} -+ {{- if .Annotations.summary }} -+ *Summary:* {{ .Annotations.summary }} -+ {{- end }} -+ {{- if .Annotations.message }} -+ *Message:* {{ .Annotations.message }} -+ {{- end }} -+ {{- if .Annotations.description }} -+ *Description:* {{ .Annotations.description }} -+ {{- end }} -+ {{- if .Annotations.runbook_url }} -+ *Runbook URL:* <{{ .Annotations.runbook_url }}|:spiral_note_pad:> -+ {{- end }} -+ {{- with .Labels }} -+ {{- with .Remove (stringSlice "alertname" "severity" "cluster") }} -+ {{- if gt (len .) 0 }} -+ *Additional Labels:* -+ {{- range .SortedPairs }} -+ • *{{ .Name }}:* `{{ .Value }}` -+ {{- end }} -+ {{- end }} -+ {{- end }} -+ {{- end }} -+ {{- with .Annotations }} -+ {{- with .Remove (stringSlice "summary" "message" "description" "runbook_url") }} -+ {{- if gt (len .) 0 }} -+ *Additional Annotations:* -+ {{- range .SortedPairs }} -+ • *{{ .Name }}:* `{{ .Value }}` -+ {{- end }} -+ {{- end }} -+ {{- end }} -+ {{- end }} -+ {{- end -}} ++ # *Cluster:* {{ template "cluster" $root }} + # *Description:* {{ .Annotations.description }} + # *Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> + # *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:> +@@ -366,14 +805,14 @@ - ingress: - enabled: false -@@ -395,7 +884,7 @@ + bearerTokenFile: + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -395,7 +834,7 @@ ## Image of Alertmanager ## image: @@ -568,7 +506,21 @@ tag: v0.22.2 sha: "" -@@ -507,9 +996,13 @@ +@@ -486,11 +925,11 @@ + # selector: {} + + +- ## The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name. string false ++ ## The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name. string false + ## + externalUrl: + +- ## The route prefix Alertmanager registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, ++ ## The route prefix Alertmanager registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, + ## but the server serves requests under a different route prefix. For example for use with kubectl proxy. + ## + routePrefix: / +@@ -507,9 +946,13 @@ ## Define resources requests and limits for single Pods. ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ ## @@ -585,7 +537,33 @@ ## 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. -@@ -613,6 +1106,30 @@ +@@ -558,7 +1001,7 @@ + # app: alertmanager + + ## SecurityContext holds pod-level security attributes and common container settings. +- ## This defaults to non root user with uid 1000 and gid 2000. *v1.PodSecurityContext false ++ ## This defaults to non root user with uid 1000 and gid 2000. *v1.PodSecurityContext false + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## + securityContext: +@@ -606,6 +1049,16 @@ + ## Use case is e.g. spanning an Alertmanager cluster across Kubernetes clusters with a single replica in each. + forceEnableClusterMode: false + ++ ## ExtraSecret can be used to store various data in an extra secret ++ ## (use it for example to store hashed basic auth credentials) ++ extraSecret: ++ ## if not set, name will be auto generated ++ # name: "" ++ annotations: {} ++ data: {} ++ # auth: | ++ # foo:$apr1$OFG3Xybp$ckL0FHDAkoXYIlH9.cysT0 ++ # someoneelse:$apr1$DMZX2Z4q$6SbQIfyuLQd.xmo/P0m2c. + + ## Using default values from https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml + ## +@@ -613,6 +1066,30 @@ enabled: true namespaceOverride: "" @@ -616,7 +594,7 @@ ## ForceDeployDatasources Create datasource configmap even if grafana deployment has been disabled ## forceDeployDatasources: false -@@ -625,6 +1142,18 @@ +@@ -625,6 +1102,18 @@ ## defaultDashboardsEnabled: true @@ -635,7 +613,7 @@ adminPassword: prom-operator ingress: -@@ -664,6 +1193,7 @@ +@@ -664,11 +1153,16 @@ dashboards: enabled: true label: grafana_dashboard @@ -643,7 +621,17 @@ ## Annotations for Grafana dashboard configmaps ## -@@ -716,7 +1246,60 @@ + annotations: {} +- multicluster: false ++ multicluster: ++ global: ++ enabled: false ++ etcd: ++ enabled: false + datasources: + enabled: true + defaultDatasourceEnabled: true +@@ -716,7 +1210,60 @@ ## Passed to grafana subchart and used by servicemonitor below ## service: @@ -705,7 +693,24 @@ ## If true, create a serviceMonitor for grafana ## -@@ -746,6 +1329,14 @@ +@@ -730,14 +1277,14 @@ + # in grafana.ini + path: "/metrics" + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -746,6 +1293,14 @@ # targetLabel: nodename # replacement: $1 # action: replace @@ -720,7 +725,34 @@ ## Component scraping the kube api server ## -@@ -907,7 +1498,7 @@ +@@ -768,7 +1323,7 @@ + component: apiserver + provider: kubernetes + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep +@@ -846,7 +1401,7 @@ + # replacement: $1 + # action: drop + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + # metrics_path is required to match upstream rules and charts + ## + cAdvisorRelabelings: +@@ -891,7 +1446,7 @@ + # replacement: $1 + # action: drop + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + # metrics_path is required to match upstream rules and charts + ## + relabelings: +@@ -907,7 +1462,7 @@ ## Component scraping the kube controller manager ## kubeControllerManager: @@ -729,7 +761,67 @@ ## If your kube controller manager is not deployed as a pod, specify IPs it can be found on ## -@@ -1054,7 +1645,7 @@ +@@ -946,14 +1501,14 @@ + # Name of the server to use when validating TLS certificate + serverName: null + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -981,14 +1536,14 @@ + ## + proxyUrl: "" + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1020,14 +1575,14 @@ + ## + proxyUrl: "" + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1041,7 +1596,7 @@ + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + dnsmasqRelabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1054,7 +1609,7 @@ ## Component scraping etcd ## kubeEtcd: @@ -738,7 +830,24 @@ ## If your etcd is not deployed as a pod, specify IPs it can be found on ## -@@ -1119,7 +1710,7 @@ +@@ -1098,14 +1653,14 @@ + certFile: "" + keyFile: "" + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1119,7 +1674,7 @@ ## Component scraping kube scheduler ## kubeScheduler: @@ -747,7 +856,24 @@ ## If your kube scheduler is not deployed as a pod, specify IPs it can be found on ## -@@ -1177,7 +1768,7 @@ +@@ -1156,14 +1711,14 @@ + ## Name of the server to use when validating TLS certificate + serverName: null + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1177,7 +1732,7 @@ ## Component scraping kube proxy ## kubeProxy: @@ -756,7 +882,41 @@ ## If your kube proxy is not deployed as a pod, specify IPs it can be found on ## -@@ -1270,6 +1861,13 @@ +@@ -1208,14 +1763,14 @@ + ## + https: false + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - action: keep +@@ -1241,14 +1796,14 @@ + ## + namespaceOverride: "" + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1270,6 +1825,13 @@ create: true podSecurityPolicy: enabled: true @@ -770,7 +930,25 @@ ## Deploy node exporter as a daemonset to all nodes ## -@@ -1323,6 +1921,16 @@ +@@ -1293,7 +1855,7 @@ + ## + scrapeTimeout: "" + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - sourceLabels: [__name__] +@@ -1302,7 +1864,7 @@ + # replacement: $1 + # action: drop + +- ## relabel configs to apply to samples before ingestion. ++ ## relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1323,6 +1885,16 @@ extraArgs: - --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)$ @@ -787,7 +965,7 @@ ## Manages Prometheus and Alertmanager components ## -@@ -1335,8 +1943,8 @@ +@@ -1335,8 +1907,8 @@ enabled: true # Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants tlsMinVersion: VersionTLS13 @@ -798,7 +976,7 @@ ## 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 -@@ -1353,7 +1961,7 @@ +@@ -1353,7 +1925,7 @@ patch: enabled: true image: @@ -807,7 +985,33 @@ tag: v1.5.2 sha: "" pullPolicy: IfNotPresent -@@ -1502,13 +2110,13 @@ +@@ -1367,7 +1939,7 @@ + tolerations: [] + + ## SecurityContext holds pod-level security attributes and common container settings. +- ## This defaults to non root user with uid 2000 and gid 2000. *v1.PodSecurityContext false ++ ## This defaults to non root user with uid 2000 and gid 2000. *v1.PodSecurityContext false + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## + securityContext: +@@ -1483,14 +2055,14 @@ + scrapeTimeout: "" + selfMonitor: true + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1502,13 +2074,13 @@ ## Resource limits & requests ## @@ -828,25 +1032,38 @@ # 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 -@@ -1561,7 +2169,7 @@ +@@ -1561,8 +2133,8 @@ ## Prometheus-operator image ## image: - repository: quay.io/prometheus-operator/prometheus-operator +- tag: v0.49.0 + repository: rancher/mirrored-prometheus-operator-prometheus-operator - tag: v0.49.0 ++ tag: v0.50.0 sha: "" pullPolicy: IfNotPresent -@@ -1577,7 +2185,7 @@ + +@@ -1577,8 +2149,8 @@ ## Prometheus-config-reloader image to use for config and rule reloading ## prometheusConfigReloaderImage: - repository: quay.io/prometheus-operator/prometheus-config-reloader +- tag: v0.49.0 + repository: rancher/mirrored-prometheus-operator-prometheus-config-reloader - tag: v0.49.0 ++ tag: v0.50.0 sha: "" -@@ -1670,7 +2278,7 @@ + ## Set the prometheus config reloader side-car CPU limit +@@ -1649,6 +2221,8 @@ + portName: grpc + port: 10901 + targetPort: "grpc" ++ loadBalancerIP: "" ++ loadBalancerSourceRanges: [] + + ## Service type + ## +@@ -1670,7 +2244,7 @@ port: 9090 ## To be used with a proxy extraContainer port @@ -855,7 +1072,54 @@ ## List of IP addresses at which the Prometheus server service is available ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips -@@ -1927,7 +2535,7 @@ +@@ -1765,6 +2339,18 @@ + # - secretName: thanos-gateway-tls + # hosts: + # - thanos-gateway.domain.com ++ # ++ ++ ## ExtraSecret can be used to store various data in an extra secret ++ ## (use it for example to store hashed basic auth credentials) ++ extraSecret: ++ ## if not set, name will be auto generated ++ # name: "" ++ annotations: {} ++ data: {} ++ # auth: | ++ # foo:$apr1$OFG3Xybp$ckL0FHDAkoXYIlH9.cysT0 ++ # someoneelse:$apr1$DMZX2Z4q$6SbQIfyuLQd.xmo/P0m2c. + + ingress: + enabled: false +@@ -1866,14 +2452,14 @@ + + bearerTokenFile: + +- ## metric relabel configs to apply to samples before ingestion. ++ ## Metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +- # relabel configs to apply to samples before ingestion. ++ # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] +@@ -1919,6 +2505,10 @@ + ## + enableAdminAPI: false + ++ ## WebTLSConfig defines the TLS parameters for HTTPS ++ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#webtlsconfig ++ web: {} ++ + # EnableFeatures API enables access to Prometheus disabled features. + # ref: https://prometheus.io/docs/prometheus/latest/disabled_features/ + enableFeatures: [] +@@ -1927,7 +2517,7 @@ ## Image of Prometheus. ## image: @@ -864,7 +1128,7 @@ tag: v2.28.1 sha: "" -@@ -1990,6 +2598,11 @@ +@@ -1990,6 +2580,11 @@ ## externalUrl: "" @@ -876,7 +1140,7 @@ ## Define which Nodes the Pods are scheduled on. ## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## -@@ -2022,7 +2635,7 @@ +@@ -2022,7 +2617,7 @@ ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the PrometheusRule resources created ## @@ -885,7 +1149,7 @@ ## PrometheusRules to be selected for target discovery. ## If {}, select all PrometheusRules -@@ -2047,7 +2660,7 @@ +@@ -2047,7 +2642,7 @@ ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the servicemonitors created ## @@ -894,7 +1158,7 @@ ## ServiceMonitors to be selected for target discovery. ## If {}, select all ServiceMonitors -@@ -2070,7 +2683,7 @@ +@@ -2070,7 +2665,7 @@ ## prometheus resource to be created with selectors based on values in the helm deployment, ## which will also match the podmonitors created ## @@ -903,7 +1167,7 @@ ## PodMonitors to be selected for target discovery. ## If {}, select all PodMonitors -@@ -2201,9 +2814,13 @@ +@@ -2201,9 +2796,13 @@ ## Resource limits & requests ## @@ -920,7 +1184,7 @@ ## Prometheus StorageSpec for persistent data ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/storage.md -@@ -2226,7 +2843,13 @@ +@@ -2226,7 +2825,13 @@ # medium: Memory # Additional volumes on the output StatefulSet definition. @@ -935,7 +1199,16 @@ # Additional VolumeMounts on the output StatefulSet definition. volumeMounts: [] -@@ -2341,9 +2964,34 @@ +@@ -2330,7 +2935,7 @@ + runAsUser: 1000 + fsGroup: 2000 + +- ## Priority class assigned to the Pods ++ ## Priority class assigned to the Pods + ## + priorityClassName: "" + +@@ -2341,8 +2946,13 @@ ## thanos: {} @@ -945,33 +1218,12 @@ + tag: 1.21.1-alpine + ## 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 -- containers: [] -+ containers: | -+ - name: prometheus-proxy -+ args: -+ - nginx -+ - -g -+ - daemon off; -+ - -c -+ - /nginx/nginx.conf -+ image: "{{ template "system_default_registry" . }}{{ .Values.prometheus.prometheusSpec.proxy.image.repository }}:{{ .Values.prometheus.prometheusSpec.proxy.image.tag }}" -+ ports: -+ - containerPort: 8081 -+ name: nginx-http -+ protocol: TCP -+ volumeMounts: -+ - mountPath: /nginx -+ name: prometheus-nginx -+ - mountPath: /var/cache/nginx -+ name: nginx-home -+ securityContext: -+ runAsUser: 101 -+ runAsGroup: 101 +- ## if using proxy extraContainer update targetPort with proxy container port ++ ## if using proxy extraContainer update targetPort with proxy container port + containers: [] ## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes - ## (permissions, dir tree) on mounted volumes before starting prometheus -@@ -2351,7 +2999,7 @@ +@@ -2351,7 +2961,7 @@ ## PortName to use for Prometheus. ##