Rebase to cc8b7c

pull/1567/head
Jiaqi Luo 2021-10-12 10:59:41 -07:00
parent e1fecd7314
commit 5fba1eec93
46 changed files with 3849 additions and 156 deletions

View File

@ -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 }}

View File

@ -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 }}

View File

@ -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

View File

@ -0,0 +1,8 @@
--- charts-original/.helmignore
+++ charts/.helmignore
@@ -24,3 +24,5 @@
hack/
ci/
kube-prometheus-*.tgz
+
+unittests/

View File

@ -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:

View File

@ -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
```

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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.

View File

@ -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:

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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 -}}

View File

@ -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 }}

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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": [

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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": [

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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": [

View File

@ -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,

View File

@ -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,

View File

@ -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": [

View File

@ -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": [

View File

@ -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,

View File

@ -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 }}

View File

@ -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 -}}

View File

@ -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

View File

@ -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 }}

View File

@ -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:

View File

@ -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 }}

View File

@ -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.
##