feat: metrics version bump, tooling fixes

This commit is contained in:
Stefan Reimer 2024-07-19 18:32:18 +00:00
parent 8967695bd6
commit 27fe40aee3
46 changed files with 26456 additions and 4135 deletions

View File

@ -4,7 +4,7 @@
set -x set -x
ARTIFACTS=($(echo $1 | tr "," "\n")) ARTIFACTS=($(echo $1 | tr "," "\n"))
ACTION=${2:-apply} ACTION=$2
LOCAL_DEV=1 LOCAL_DEV=1
@ -70,15 +70,19 @@ if [ ${ARTIFACTS[0]} == "all" ]; then
ARTIFACTS=($(ls $WORKDIR/kubezero/templates | sed -e 's/.yaml//g')) ARTIFACTS=($(ls $WORKDIR/kubezero/templates | sed -e 's/.yaml//g'))
fi fi
if [ $ACTION == "apply" -o $ACTION == "crds" ]; then
for t in ${ARTIFACTS[@]}; do
_helm $ACTION $t || true
done
# Delete in reverse order, continue even if errors # Delete in reverse order, continue even if errors
elif [ $ACTION == "delete" ]; then if [ $ACTION == "delete" ]; then
set +e set +e
for (( idx=${#ARTIFACTS[@]}-1 ; idx>=0 ; idx-- )) ; do for (( idx=${#ARTIFACTS[@]}-1 ; idx>=0 ; idx-- )) ; do
_helm delete ${ARTIFACTS[idx]} || true _helm delete ${ARTIFACTS[idx]} || true
done done
else
if [ "$ACTION" == "" -o "$ACTION" == "crds" ]; then
for t in ${ARTIFACTS[@]}; do
_helm crds $t || true
done
fi
for t in ${ARTIFACTS[@]}; do
_helm apply $t || true
done
fi fi

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Simulate well-known CRDs being available # Simulate well-known CRDs being available
API_VERSIONS="-a monitoring.coreos.com/v1 -a snapshot.storage.k8s.io/v1 -a policy/v1/PodDisruptionBudget" API_VERSIONS="-a monitoring.coreos.com/v1 -a snapshot.storage.k8s.io/v1 -a policy/v1/PodDisruptionBudget -a apiregistration.k8s.io/v1"
export HELM_SECRETS_BACKEND="vals" export HELM_SECRETS_BACKEND="vals"
@ -108,11 +108,13 @@ function delete_ns() {
# Extract crds via helm calls # Extract crds via helm calls
function _crds() { function _crds() {
helm secrets --evaluate-templates template $(chart_location $chart) -n $namespace --name-template $module $targetRevision --include-crds --set ${module}.installCRDs=true -f $WORKDIR/values.yaml $API_VERSIONS --kube-version $KUBE_VERSION $@ | python3 -c ' helm secrets --evaluate-templates template $(chart_location $chart) -n $namespace --name-template $module $targetRevision --include-crds -f $WORKDIR/values.yaml $API_VERSIONS --kube-version $KUBE_VERSION $@ | python3 -c '
#!/usr/bin/python3 #!/usr/bin/python3
import yaml import yaml
import sys import sys
yaml.add_multi_constructor("tag:yaml.org,2002:value", lambda loader, suffix, node: None, Loader=yaml.SafeLoader)
for manifest in yaml.safe_load_all(sys.stdin): for manifest in yaml.safe_load_all(sys.stdin):
if manifest: if manifest:
if "kind" in manifest and manifest["kind"] == "CustomResourceDefinition": if "kind" in manifest and manifest["kind"] == "CustomResourceDefinition":
@ -136,6 +138,8 @@ function render() {
import yaml import yaml
import sys import sys
yaml.add_multi_constructor("tag:yaml.org,2002:value", lambda loader, suffix, node: None, Loader=yaml.SafeLoader)
for manifest in yaml.safe_load_all(sys.stdin): for manifest in yaml.safe_load_all(sys.stdin):
if manifest: if manifest:
if "kind" in manifest and manifest["kind"] == "CustomResourceDefinition": if "kind" in manifest and manifest["kind"] == "CustomResourceDefinition":

View File

@ -45,7 +45,7 @@ argo-cd:
format: json format: json
image: image:
repository: public.ecr.aws/zero-downtime/zdt-argocd repository: public.ecr.aws/zero-downtime/zdt-argocd
tag: v2.11.0 tag: v2.11.5
configs: configs:
styles: | styles: |

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: kubezero-metrics name: kubezero-metrics
description: KubeZero Umbrella Chart for Prometheus, Grafana and Alertmanager as well as all Kubernetes integrations. description: KubeZero Umbrella Chart for Prometheus, Grafana and Alertmanager as well as all Kubernetes integrations.
type: application type: application
version: 0.9.10 version: 0.10.0
home: https://kubezero.com home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
keywords: keywords:

View File

@ -1,6 +1,6 @@
# kubezero-metrics # kubezero-metrics
![Version: 0.9.9](https://img.shields.io/badge/Version-0.9.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.10.0](https://img.shields.io/badge/Version-0.10.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
KubeZero Umbrella Chart for Prometheus, Grafana and Alertmanager as well as all Kubernetes integrations. KubeZero Umbrella Chart for Prometheus, Grafana and Alertmanager as well as all Kubernetes integrations.
@ -19,7 +19,7 @@ Kubernetes: `>= 1.26.0`
| Repository | Name | Version | | Repository | Name | Version |
|------------|------|---------| |------------|------|---------|
| https://cdn.zero-downtime.net/charts/ | kubezero-lib | >= 0.1.6 | | https://cdn.zero-downtime.net/charts/ | kubezero-lib | >= 0.1.6 |
| https://prometheus-community.github.io/helm-charts | kube-prometheus-stack | 58.7.2 | | https://prometheus-community.github.io/helm-charts | kube-prometheus-stack | 61.3.2 |
| https://prometheus-community.github.io/helm-charts | prometheus-adapter | 4.10.0 | | https://prometheus-community.github.io/helm-charts | prometheus-adapter | 4.10.0 |
| https://prometheus-community.github.io/helm-charts | prometheus-pushgateway | 2.14.0 | | https://prometheus-community.github.io/helm-charts | prometheus-pushgateway | 2.14.0 |

View File

@ -7,7 +7,7 @@ annotations:
url: https://github.com/prometheus-operator/kube-prometheus url: https://github.com/prometheus-operator/kube-prometheus
artifacthub.io/operator: "true" artifacthub.io/operator: "true"
apiVersion: v2 apiVersion: v2
appVersion: v0.73.2 appVersion: v0.75.1
dependencies: dependencies:
- condition: crds.enabled - condition: crds.enabled
name: crds name: crds
@ -16,15 +16,15 @@ dependencies:
- condition: kubeStateMetrics.enabled - condition: kubeStateMetrics.enabled
name: kube-state-metrics name: kube-state-metrics
repository: https://prometheus-community.github.io/helm-charts repository: https://prometheus-community.github.io/helm-charts
version: 5.19.* version: 5.21.*
- condition: nodeExporter.enabled - condition: nodeExporter.enabled
name: prometheus-node-exporter name: prometheus-node-exporter
repository: https://prometheus-community.github.io/helm-charts repository: https://prometheus-community.github.io/helm-charts
version: 4.34.* version: 4.37.*
- condition: grafana.enabled - condition: grafana.enabled
name: grafana name: grafana
repository: https://grafana.github.io/helm-charts repository: https://grafana.github.io/helm-charts
version: 7.3.* version: 8.3.*
- condition: windowsMonitoring.enabled - condition: windowsMonitoring.enabled
name: prometheus-windows-exporter name: prometheus-windows-exporter
repository: https://prometheus-community.github.io/helm-charts repository: https://prometheus-community.github.io/helm-charts
@ -62,4 +62,4 @@ sources:
- https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus - https://github.com/prometheus-operator/kube-prometheus
type: application type: application
version: 58.7.2 version: 61.3.2

View File

@ -82,6 +82,48 @@ _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documen
A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.
### From 60.x to 61.x
This version upgrades Prometheus-Operator to v0.75.0
Run these commands to update the CRDs before applying the upgrade.
```console
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
```
### From 59.x to 60.x
This version upgrades the Grafana chart to v8.0.x which introduces Grafana 11. This new major version of Grafana contains some breaking changes described in [Breaking changes in Grafana v11.0](https://grafana.com/docs/grafana/latest/breaking-changes/breaking-changes-v11-0/).
### From 58.x to 59.x
This version upgrades Prometheus-Operator to v0.74.0
Run these commands to update the CRDs before applying the upgrade.
```console
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.74.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
```
### From 57.x to 58.x ### From 57.x to 58.x
This version upgrades Prometheus-Operator to v0.73.0 This version upgrades Prometheus-Operator to v0.73.0

View File

@ -1,11 +1,11 @@
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.73.2/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml # https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
--- ---
apiVersion: apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.13.0 controller-gen.kubebuilder.io/version: v0.15.0
operator.prometheus.io/version: 0.73.2 operator.prometheus.io/version: 0.75.1
argocd.argoproj.io/sync-options: ServerSideApply=true argocd.argoproj.io/sync-options: ServerSideApply=true
name: podmonitors.monitoring.coreos.com name: podmonitors.monitoring.coreos.com
spec: spec:
@ -27,10 +27,19 @@ spec:
description: PodMonitor defines monitoring for a set of pods. description: PodMonitor defines monitoring for a set of pods.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -38,40 +47,85 @@ spec:
description: Specification of desired Pod selection for target discovery by Prometheus. description: Specification of desired Pod selection for target discovery by Prometheus.
properties: properties:
attachMetadata: attachMetadata:
description: "`attachMetadata` defines additional metadata which is added to the discovered targets. \n It requires Prometheus >= v2.37.0." description: |-
`attachMetadata` defines additional metadata which is added to the
discovered targets.
It requires Prometheus >= v2.37.0.
properties: properties:
node: node:
description: When set to true, Prometheus must have the `get` permission on the `Nodes` objects. description: |-
When set to true, Prometheus must have the `get` permission on the
`Nodes` objects.
type: boolean type: boolean
type: object type: object
bodySizeLimit: bodySizeLimit:
description: "When defined, bodySizeLimit specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus. \n It requires Prometheus >= v2.28.0." description: |-
When defined, bodySizeLimit specifies a job level limit on the size
of uncompressed response body that will be accepted by Prometheus.
It requires Prometheus >= v2.28.0.
pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$ pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$
type: string type: string
jobLabel: jobLabel:
description: "The label to use to retrieve the job name from. `jobLabel` selects the label from the associated Kubernetes `Pod` object which will be used as the `job` label for all metrics. \n For example if `jobLabel` is set to `foo` and the Kubernetes `Pod` object is labeled with `foo: bar`, then Prometheus adds the `job=\"bar\"` label to all ingested metrics. \n If the value of this field is empty, the `job` label of the metrics defaults to the namespace and name of the PodMonitor object (e.g. `<namespace>/<name>`)." description: |-
The label to use to retrieve the job name from.
`jobLabel` selects the label from the associated Kubernetes `Pod`
object which will be used as the `job` label for all metrics.
For example if `jobLabel` is set to `foo` and the Kubernetes `Pod`
object is labeled with `foo: bar`, then Prometheus adds the `job="bar"`
label to all ingested metrics.
If the value of this field is empty, the `job` label of the metrics
defaults to the namespace and name of the PodMonitor object (e.g. `<namespace>/<name>`).
type: string type: string
keepDroppedTargets: keepDroppedTargets:
description: "Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit. \n It requires Prometheus >= v2.47.0." description: |-
Per-scrape limit on the number of targets dropped by relabeling
that will be kept in memory. 0 means no limit.
It requires Prometheus >= v2.47.0.
format: int64 format: int64
type: integer type: integer
labelLimit: labelLimit:
description: "Per-scrape limit on number of labels that will be accepted for a sample. \n It requires Prometheus >= v2.27.0." description: |-
Per-scrape limit on number of labels that will be accepted for a sample.
It requires Prometheus >= v2.27.0.
format: int64 format: int64
type: integer type: integer
labelNameLengthLimit: labelNameLengthLimit:
description: "Per-scrape limit on length of labels name that will be accepted for a sample. \n It requires Prometheus >= v2.27.0." description: |-
Per-scrape limit on length of labels name that will be accepted for a sample.
It requires Prometheus >= v2.27.0.
format: int64 format: int64
type: integer type: integer
labelValueLengthLimit: labelValueLengthLimit:
description: "Per-scrape limit on length of labels value that will be accepted for a sample. \n It requires Prometheus >= v2.27.0." description: |-
Per-scrape limit on length of labels value that will be accepted for a sample.
It requires Prometheus >= v2.27.0.
format: int64 format: int64
type: integer type: integer
namespaceSelector: namespaceSelector:
description: Selector to select which namespaces the Kubernetes `Pods` objects are discovered from. description: |-
Selector to select which namespaces the Kubernetes `Pods` objects
are discovered from.
properties: properties:
any: any:
description: Boolean describing whether all namespaces are selected in contrast to a list restricting them. description: |-
Boolean describing whether all namespaces are selected in contrast to a
list restricting them.
type: boolean type: boolean
matchNames: matchNames:
description: List of namespace names to select from. description: List of namespace names to select from.
@ -82,10 +136,17 @@ spec:
podMetricsEndpoints: podMetricsEndpoints:
description: List of endpoints part of this PodMonitor. description: List of endpoints part of this PodMonitor.
items: items:
description: PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus. description: |-
PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by
Prometheus.
properties: properties:
authorization: authorization:
description: "`authorization` configures the Authorization header credentials to use when scraping the target. \n Cannot be set at the same time as `basicAuth`, or `oauth2`." description: |-
`authorization` configures the Authorization header credentials to use when
scraping the target.
Cannot be set at the same time as `basicAuth`, or `oauth2`.
properties: properties:
credentials: credentials:
description: Selects a key of a Secret in the namespace that contains the credentials for authentication. description: Selects a key of a Secret in the namespace that contains the credentials for authentication.
@ -94,7 +155,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -104,20 +173,42 @@ spec:
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: type:
description: "Defines the authentication type. The value is case-insensitive. \n \"Basic\" is not a supported value. \n Default: \"Bearer\"" description: |-
Defines the authentication type. The value is case-insensitive.
"Basic" is not a supported value.
Default: "Bearer"
type: string type: string
type: object type: object
basicAuth: basicAuth:
description: "`basicAuth` configures the Basic Authentication credentials to use when scraping the target. \n Cannot be set at the same time as `authorization`, or `oauth2`." description: |-
`basicAuth` configures the Basic Authentication credentials to use when
scraping the target.
Cannot be set at the same time as `authorization`, or `oauth2`.
properties: properties:
password: password:
description: '`password` specifies a key of a Secret containing the password for authentication.' description: |-
`password` specifies a key of a Secret containing the password for
authentication.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -127,13 +218,23 @@ spec:
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
username: username:
description: '`username` specifies a key of a Secret containing the username for authentication.' description: |-
`username` specifies a key of a Secret containing the username for
authentication.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -144,13 +245,27 @@ spec:
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: object type: object
bearerTokenSecret: bearerTokenSecret:
description: "`bearerTokenSecret` specifies a key of a Secret containing the bearer token for scraping targets. The secret needs to be in the same namespace as the PodMonitor object and readable by the Prometheus Operator. \n Deprecated: use `authorization` instead." description: |-
`bearerTokenSecret` specifies a key of a Secret containing the bearer
token for scraping targets. The secret needs to be in the same namespace
as the PodMonitor object and readable by the Prometheus Operator.
Deprecated: use `authorization` instead.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -163,29 +278,62 @@ spec:
description: '`enableHttp2` can be used to disable HTTP2 when scraping the target.' description: '`enableHttp2` can be used to disable HTTP2 when scraping the target.'
type: boolean type: boolean
filterRunning: filterRunning:
description: "When true, the pods which are not running (e.g. either in Failed or Succeeded state) are dropped during the target discovery. \n If unset, the filtering is enabled. \n More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase" description: |-
When true, the pods which are not running (e.g. either in Failed or
Succeeded state) are dropped during the target discovery.
If unset, the filtering is enabled.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
type: boolean type: boolean
followRedirects: followRedirects:
description: '`followRedirects` defines whether the scrape requests should follow HTTP 3xx redirects.' description: |-
`followRedirects` defines whether the scrape requests should follow HTTP
3xx redirects.
type: boolean type: boolean
honorLabels: honorLabels:
description: When true, `honorLabels` preserves the metric's labels when they collide with the target's labels. description: |-
When true, `honorLabels` preserves the metric's labels when they collide
with the target's labels.
type: boolean type: boolean
honorTimestamps: honorTimestamps:
description: '`honorTimestamps` controls whether Prometheus preserves the timestamps when exposed by the target.' description: |-
`honorTimestamps` controls whether Prometheus preserves the timestamps
when exposed by the target.
type: boolean type: boolean
interval: interval:
description: "Interval at which Prometheus scrapes the metrics from the target. \n If empty, Prometheus uses the global scrape interval." description: |-
Interval at which Prometheus scrapes the metrics from the target.
If empty, Prometheus uses the global scrape interval.
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
type: string type: string
metricRelabelings: metricRelabelings:
description: '`metricRelabelings` configures the relabeling rules to apply to the samples before ingestion.' description: |-
`metricRelabelings` configures the relabeling rules to apply to the
samples before ingestion.
items: items:
description: "RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
properties: properties:
action: action:
default: replace default: replace
description: "Action to perform based on the regex matching. \n `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. \n Default: \"Replace\"" description: |-
Action to perform based on the regex matching.
`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
Default: "Replace"
enum: enum:
- replace - replace
- Replace - Replace
@ -211,35 +359,66 @@ spec:
- DropEqual - DropEqual
type: string type: string
modulus: modulus:
description: "Modulus to take of the hash of the source label values. \n Only applicable when the action is `HashMod`." description: |-
Modulus to take of the hash of the source label values.
Only applicable when the action is `HashMod`.
format: int64 format: int64
type: integer type: integer
regex: regex:
description: Regular expression against which the extracted value is matched. description: Regular expression against which the extracted value is matched.
type: string type: string
replacement: replacement:
description: "Replacement value against which a Replace action is performed if the regular expression matches. \n Regex capture groups are available." description: |-
Replacement value against which a Replace action is performed if the
regular expression matches.
Regex capture groups are available.
type: string type: string
separator: separator:
description: Separator is the string between concatenated SourceLabels. description: Separator is the string between concatenated SourceLabels.
type: string type: string
sourceLabels: sourceLabels:
description: The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression. description: |-
The source labels select values from existing labels. Their content is
concatenated using the configured Separator and matched against the
configured regular expression.
items: items:
description: LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores. description: |-
LabelName is a valid Prometheus label name which may only contain ASCII
letters, numbers, as well as underscores.
pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
type: string type: string
type: array type: array
targetLabel: targetLabel:
description: "Label to which the resulting string is written in a replacement. \n It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. \n Regex capture groups are available." description: |-
Label to which the resulting string is written in a replacement.
It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
`KeepEqual` and `DropEqual` actions.
Regex capture groups are available.
type: string type: string
type: object type: object
type: array type: array
oauth2: oauth2:
description: "`oauth2` configures the OAuth2 settings to use when scraping the target. \n It requires Prometheus >= 2.27.0. \n Cannot be set at the same time as `authorization`, or `basicAuth`." description: |-
`oauth2` configures the OAuth2 settings to use when scraping the target.
It requires Prometheus >= 2.27.0.
Cannot be set at the same time as `authorization`, or `basicAuth`.
properties: properties:
clientId: clientId:
description: '`clientId` specifies a key of a Secret or ConfigMap containing the OAuth2 client''s ID.' description: |-
`clientId` specifies a key of a Secret or ConfigMap containing the
OAuth2 client's ID.
properties: properties:
configMap: configMap:
description: ConfigMap containing data to use for the targets. description: ConfigMap containing data to use for the targets.
@ -248,7 +427,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -264,7 +451,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -275,13 +470,23 @@ spec:
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: object type: object
clientSecret: clientSecret:
description: '`clientSecret` specifies a key of a Secret containing the OAuth2 client''s secret.' description: |-
`clientSecret` specifies a key of a Secret containing the OAuth2
client's secret.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -293,7 +498,9 @@ spec:
endpointParams: endpointParams:
additionalProperties: additionalProperties:
type: string type: string
description: '`endpointParams` configures the HTTP parameters to append to the token URL.' description: |-
`endpointParams` configures the HTTP parameters to append to the token
URL.
type: object type: object
scopes: scopes:
description: '`scopes` defines the OAuth2 scopes used for the token request.' description: '`scopes` defines the OAuth2 scopes used for the token request.'
@ -317,22 +524,56 @@ spec:
description: '`params` define optional HTTP URL parameters.' description: '`params` define optional HTTP URL parameters.'
type: object type: object
path: path:
description: "HTTP path from which to scrape for metrics. \n If empty, Prometheus uses the default value (e.g. `/metrics`)." description: |-
HTTP path from which to scrape for metrics.
If empty, Prometheus uses the default value (e.g. `/metrics`).
type: string type: string
port: port:
description: "Name of the Pod port which this endpoint refers to. \n It takes precedence over `targetPort`." description: |-
Name of the Pod port which this endpoint refers to.
It takes precedence over `targetPort`.
type: string type: string
proxyUrl: proxyUrl:
description: '`proxyURL` configures the HTTP Proxy URL (e.g. "http://proxyserver:2195") to go through when scraping the target.' description: |-
`proxyURL` configures the HTTP Proxy URL (e.g.
"http://proxyserver:2195") to go through when scraping the target.
type: string type: string
relabelings: relabelings:
description: "`relabelings` configures the relabeling rules to apply the target's metadata labels. \n The Operator automatically adds relabelings for a few standard Kubernetes fields. \n The original scrape job's name is available via the `__tmp_prometheus_job_name` label. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
`relabelings` configures the relabeling rules to apply the target's
metadata labels.
The Operator automatically adds relabelings for a few standard Kubernetes fields.
The original scrape job's name is available via the `__tmp_prometheus_job_name` label.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
items: items:
description: "RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
properties: properties:
action: action:
default: replace default: replace
description: "Action to perform based on the regex matching. \n `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. \n Default: \"Replace\"" description: |-
Action to perform based on the regex matching.
`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
Default: "Replace"
enum: enum:
- replace - replace
- Replace - Replace
@ -358,45 +599,85 @@ spec:
- DropEqual - DropEqual
type: string type: string
modulus: modulus:
description: "Modulus to take of the hash of the source label values. \n Only applicable when the action is `HashMod`." description: |-
Modulus to take of the hash of the source label values.
Only applicable when the action is `HashMod`.
format: int64 format: int64
type: integer type: integer
regex: regex:
description: Regular expression against which the extracted value is matched. description: Regular expression against which the extracted value is matched.
type: string type: string
replacement: replacement:
description: "Replacement value against which a Replace action is performed if the regular expression matches. \n Regex capture groups are available." description: |-
Replacement value against which a Replace action is performed if the
regular expression matches.
Regex capture groups are available.
type: string type: string
separator: separator:
description: Separator is the string between concatenated SourceLabels. description: Separator is the string between concatenated SourceLabels.
type: string type: string
sourceLabels: sourceLabels:
description: The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression. description: |-
The source labels select values from existing labels. Their content is
concatenated using the configured Separator and matched against the
configured regular expression.
items: items:
description: LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores. description: |-
LabelName is a valid Prometheus label name which may only contain ASCII
letters, numbers, as well as underscores.
pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
type: string type: string
type: array type: array
targetLabel: targetLabel:
description: "Label to which the resulting string is written in a replacement. \n It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. \n Regex capture groups are available." description: |-
Label to which the resulting string is written in a replacement.
It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
`KeepEqual` and `DropEqual` actions.
Regex capture groups are available.
type: string type: string
type: object type: object
type: array type: array
scheme: scheme:
description: "HTTP scheme to use for scraping. \n `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling. \n If empty, Prometheus uses the default value `http`." description: |-
HTTP scheme to use for scraping.
`http` and `https` are the expected values unless you rewrite the
`__scheme__` label via relabeling.
If empty, Prometheus uses the default value `http`.
enum: enum:
- http - http
- https - https
type: string type: string
scrapeTimeout: scrapeTimeout:
description: "Timeout after which Prometheus considers the scrape to be failed. \n If empty, Prometheus uses the global scrape timeout unless it is less than the target's scrape interval value in which the latter is used." description: |-
Timeout after which Prometheus considers the scrape to be failed.
If empty, Prometheus uses the global scrape timeout unless it is less
than the target's scrape interval value in which the latter is used.
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
type: string type: string
targetPort: targetPort:
anyOf: anyOf:
- type: integer - type: integer
- type: string - type: string
description: "Name or number of the target port of the `Pod` object behind the Service, the port must be specified with container port property. \n Deprecated: use 'port' instead." description: |-
Name or number of the target port of the `Pod` object behind the Service, the
port must be specified with container port property.
Deprecated: use 'port' instead.
x-kubernetes-int-or-string: true x-kubernetes-int-or-string: true
tlsConfig: tlsConfig:
description: TLS configuration to use when scraping the target. description: TLS configuration to use when scraping the target.
@ -411,7 +692,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -427,7 +716,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -447,7 +744,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -463,7 +768,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -483,7 +796,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -497,17 +818,27 @@ spec:
type: string type: string
type: object type: object
trackTimestampsStaleness: trackTimestampsStaleness:
description: "`trackTimestampsStaleness` defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data. Has no effect if `honorTimestamps` is false. \n It requires Prometheus >= v2.48.0." description: |-
`trackTimestampsStaleness` defines whether Prometheus tracks staleness of
the metrics that have an explicit timestamp present in scraped data.
Has no effect if `honorTimestamps` is false.
It requires Prometheus >= v2.48.0.
type: boolean type: boolean
type: object type: object
type: array type: array
podTargetLabels: podTargetLabels:
description: '`podTargetLabels` defines the labels which are transferred from the associated Kubernetes `Pod` object onto the ingested metrics.' description: |-
`podTargetLabels` defines the labels which are transferred from the
associated Kubernetes `Pod` object onto the ingested metrics.
items: items:
type: string type: string
type: array type: array
sampleLimit: sampleLimit:
description: '`sampleLimit` defines a per-scrape limit on the number of scraped samples that will be accepted.' description: |-
`sampleLimit` defines a per-scrape limit on the number of scraped samples
that will be accepted.
format: int64 format: int64
type: integer type: integer
scrapeClass: scrapeClass:
@ -515,9 +846,23 @@ spec:
minLength: 1 minLength: 1
type: string type: string
scrapeProtocols: scrapeProtocols:
description: "`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the protocols supported by Prometheus in order of preference (from most to least preferred). \n If unset, Prometheus uses its default value. \n It requires Prometheus >= v2.49.0." description: |-
`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the
protocols supported by Prometheus in order of preference (from most to least preferred).
If unset, Prometheus uses its default value.
It requires Prometheus >= v2.49.0.
items: items:
description: 'ScrapeProtocol represents a protocol used by Prometheus for scraping metrics. Supported values are: * `OpenMetricsText0.0.1` * `OpenMetricsText1.0.0` * `PrometheusProto` * `PrometheusText0.0.4`' description: |-
ScrapeProtocol represents a protocol used by Prometheus for scraping metrics.
Supported values are:
* `OpenMetricsText0.0.1`
* `OpenMetricsText1.0.0`
* `PrometheusProto`
* `PrometheusText0.0.4`
enum: enum:
- PrometheusProto - PrometheusProto
- OpenMetricsText0.0.1 - OpenMetricsText0.0.1
@ -532,33 +877,48 @@ spec:
matchExpressions: matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed. description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
items: items:
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties: properties:
key: key:
description: key is the label key that the selector applies to. description: key is the label key that the selector applies to.
type: string type: string
operator: operator:
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string type: string
values: values:
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object type: object
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
targetLimit: targetLimit:
description: '`targetLimit` defines a limit on the number of scraped targets that will be accepted.' description: |-
`targetLimit` defines a limit on the number of scraped targets that will
be accepted.
format: int64 format: int64
type: integer type: integer
required: required:

View File

@ -1,11 +1,11 @@
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.73.2/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml # https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
--- ---
apiVersion: apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.13.0 controller-gen.kubebuilder.io/version: v0.15.0
operator.prometheus.io/version: 0.73.2 operator.prometheus.io/version: 0.75.1
argocd.argoproj.io/sync-options: ServerSideApply=true argocd.argoproj.io/sync-options: ServerSideApply=true
name: probes.monitoring.coreos.com name: probes.monitoring.coreos.com
spec: spec:
@ -27,10 +27,19 @@ spec:
description: Probe defines monitoring for a set of static targets or ingresses. description: Probe defines monitoring for a set of static targets or ingresses.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -47,7 +56,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -57,20 +74,39 @@ spec:
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: type:
description: "Defines the authentication type. The value is case-insensitive. \n \"Basic\" is not a supported value. \n Default: \"Bearer\"" description: |-
Defines the authentication type. The value is case-insensitive.
"Basic" is not a supported value.
Default: "Bearer"
type: string type: string
type: object type: object
basicAuth: basicAuth:
description: 'BasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint' description: |-
BasicAuth allow an endpoint to authenticate over basic authentication.
More info: https://prometheus.io/docs/operating/configuration/#endpoint
properties: properties:
password: password:
description: '`password` specifies a key of a Secret containing the password for authentication.' description: |-
`password` specifies a key of a Secret containing the password for
authentication.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -80,13 +116,23 @@ spec:
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
username: username:
description: '`username` specifies a key of a Secret containing the username for authentication.' description: |-
`username` specifies a key of a Secret containing the username for
authentication.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -97,13 +143,24 @@ spec:
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: object type: object
bearerTokenSecret: bearerTokenSecret:
description: Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the probe and accessible by the Prometheus Operator. description: |-
Secret to mount to read bearer token for scraping targets. The secret
needs to be in the same namespace as the probe and accessible by
the Prometheus Operator.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -113,36 +170,62 @@ spec:
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
interval: interval:
description: Interval at which targets are probed using the configured prober. If not specified Prometheus' global scrape interval is used. description: |-
Interval at which targets are probed using the configured prober.
If not specified Prometheus' global scrape interval is used.
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
type: string type: string
jobName: jobName:
description: The job name assigned to scraped metrics by default. description: The job name assigned to scraped metrics by default.
type: string type: string
keepDroppedTargets: keepDroppedTargets:
description: "Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit. \n It requires Prometheus >= v2.47.0." description: |-
Per-scrape limit on the number of targets dropped by relabeling
that will be kept in memory. 0 means no limit.
It requires Prometheus >= v2.47.0.
format: int64 format: int64
type: integer type: integer
labelLimit: 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. 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 format: int64
type: integer type: integer
labelNameLengthLimit: 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. 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 format: int64
type: integer type: integer
labelValueLengthLimit: 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. 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 format: int64
type: integer type: integer
metricRelabelings: metricRelabelings:
description: MetricRelabelConfigs to apply to samples before ingestion. description: MetricRelabelConfigs to apply to samples before ingestion.
items: items:
description: "RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
properties: properties:
action: action:
default: replace default: replace
description: "Action to perform based on the regex matching. \n `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. \n Default: \"Replace\"" description: |-
Action to perform based on the regex matching.
`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
Default: "Replace"
enum: enum:
- replace - replace
- Replace - Replace
@ -168,38 +251,65 @@ spec:
- DropEqual - DropEqual
type: string type: string
modulus: modulus:
description: "Modulus to take of the hash of the source label values. \n Only applicable when the action is `HashMod`." description: |-
Modulus to take of the hash of the source label values.
Only applicable when the action is `HashMod`.
format: int64 format: int64
type: integer type: integer
regex: regex:
description: Regular expression against which the extracted value is matched. description: Regular expression against which the extracted value is matched.
type: string type: string
replacement: replacement:
description: "Replacement value against which a Replace action is performed if the regular expression matches. \n Regex capture groups are available." description: |-
Replacement value against which a Replace action is performed if the
regular expression matches.
Regex capture groups are available.
type: string type: string
separator: separator:
description: Separator is the string between concatenated SourceLabels. description: Separator is the string between concatenated SourceLabels.
type: string type: string
sourceLabels: sourceLabels:
description: The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression. description: |-
The source labels select values from existing labels. Their content is
concatenated using the configured Separator and matched against the
configured regular expression.
items: items:
description: LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores. description: |-
LabelName is a valid Prometheus label name which may only contain ASCII
letters, numbers, as well as underscores.
pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
type: string type: string
type: array type: array
targetLabel: targetLabel:
description: "Label to which the resulting string is written in a replacement. \n It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. \n Regex capture groups are available." description: |-
Label to which the resulting string is written in a replacement.
It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
`KeepEqual` and `DropEqual` actions.
Regex capture groups are available.
type: string type: string
type: object type: object
type: array type: array
module: 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' 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 type: string
oauth2: oauth2:
description: OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer. description: OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.
properties: properties:
clientId: clientId:
description: '`clientId` specifies a key of a Secret or ConfigMap containing the OAuth2 client''s ID.' description: |-
`clientId` specifies a key of a Secret or ConfigMap containing the
OAuth2 client's ID.
properties: properties:
configMap: configMap:
description: ConfigMap containing data to use for the targets. description: ConfigMap containing data to use for the targets.
@ -208,7 +318,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -224,7 +342,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -235,13 +361,23 @@ spec:
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: object type: object
clientSecret: clientSecret:
description: '`clientSecret` specifies a key of a Secret containing the OAuth2 client''s secret.' description: |-
`clientSecret` specifies a key of a Secret containing the OAuth2
client's secret.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -253,7 +389,9 @@ spec:
endpointParams: endpointParams:
additionalProperties: additionalProperties:
type: string type: string
description: '`endpointParams` configures the HTTP parameters to append to the token URL.' description: |-
`endpointParams` configures the HTTP parameters to append to the token
URL.
type: object type: object
scopes: scopes:
description: '`scopes` defines the OAuth2 scopes used for the token request.' description: '`scopes` defines the OAuth2 scopes used for the token request.'
@ -270,17 +408,24 @@ spec:
- tokenUrl - tokenUrl
type: object type: object
prober: prober:
description: Specification for the prober to use for probing targets. The prober.URL parameter is required. Targets cannot be probed if left empty. description: |-
Specification for the prober to use for probing targets.
The prober.URL parameter is required. Targets cannot be probed if left empty.
properties: properties:
path: path:
default: /probe default: /probe
description: Path to collect metrics from. Defaults to `/probe`. description: |-
Path to collect metrics from.
Defaults to `/probe`.
type: string type: string
proxyUrl: proxyUrl:
description: Optional ProxyURL. description: Optional ProxyURL.
type: string type: string
scheme: scheme:
description: HTTP scheme to use for scraping. `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling. If empty, Prometheus uses the default value `http`. description: |-
HTTP scheme to use for scraping.
`http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling.
If empty, Prometheus uses the default value `http`.
enum: enum:
- http - http
- https - https
@ -300,9 +445,23 @@ spec:
minLength: 1 minLength: 1
type: string type: string
scrapeProtocols: scrapeProtocols:
description: "`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the protocols supported by Prometheus in order of preference (from most to least preferred). \n If unset, Prometheus uses its default value. \n It requires Prometheus >= v2.49.0." description: |-
`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the
protocols supported by Prometheus in order of preference (from most to least preferred).
If unset, Prometheus uses its default value.
It requires Prometheus >= v2.49.0.
items: items:
description: 'ScrapeProtocol represents a protocol used by Prometheus for scraping metrics. Supported values are: * `OpenMetricsText0.0.1` * `OpenMetricsText1.0.0` * `PrometheusProto` * `PrometheusText0.0.4`' description: |-
ScrapeProtocol represents a protocol used by Prometheus for scraping metrics.
Supported values are:
* `OpenMetricsText0.0.1`
* `OpenMetricsText1.0.0`
* `PrometheusProto`
* `PrometheusText0.0.4`
enum: enum:
- PrometheusProto - PrometheusProto
- OpenMetricsText0.0.1 - OpenMetricsText0.0.1
@ -312,7 +471,9 @@ spec:
type: array type: array
x-kubernetes-list-type: set x-kubernetes-list-type: set
scrapeTimeout: scrapeTimeout:
description: Timeout for scraping metrics from the Prometheus exporter. If not specified, the Prometheus global scrape timeout is used. description: |-
Timeout for scraping metrics from the Prometheus exporter.
If not specified, the Prometheus global scrape timeout is used.
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
type: string type: string
targetLimit: targetLimit:
@ -323,13 +484,18 @@ spec:
description: Targets defines a set of static or dynamically discovered targets to probe. description: Targets defines a set of static or dynamically discovered targets to probe.
properties: properties:
ingress: ingress:
description: ingress defines the Ingress objects to probe and the relabeling configuration. If `staticConfig` is also defined, `staticConfig` takes precedence. description: |-
ingress defines the Ingress objects to probe and the relabeling
configuration.
If `staticConfig` is also defined, `staticConfig` takes precedence.
properties: properties:
namespaceSelector: namespaceSelector:
description: From which namespaces to select Ingress objects. description: From which namespaces to select Ingress objects.
properties: properties:
any: any:
description: Boolean describing whether all namespaces are selected in contrast to a list restricting them. description: |-
Boolean describing whether all namespaces are selected in contrast to a
list restricting them.
type: boolean type: boolean
matchNames: matchNames:
description: List of namespace names to select from. description: List of namespace names to select from.
@ -338,13 +504,33 @@ spec:
type: array type: array
type: object type: object
relabelingConfigs: relabelingConfigs:
description: 'RelabelConfigs to apply to the label set of the target before it gets scraped. The original ingress address is available via the `__tmp_prometheus_ingress_address` label. It can be used to customize the probed URL. The original scrape job''s name is available via the `__tmp_prometheus_job_name` label. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config' description: |-
RelabelConfigs to apply to the label set of the target before it gets
scraped.
The original ingress address is available via the
`__tmp_prometheus_ingress_address` label. It can be used to customize the
probed URL.
The original scrape job's name is available via the `__tmp_prometheus_job_name` label.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
items: items:
description: "RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
properties: properties:
action: action:
default: replace default: replace
description: "Action to perform based on the regex matching. \n `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. \n Default: \"Replace\"" description: |-
Action to perform based on the regex matching.
`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
Default: "Replace"
enum: enum:
- replace - replace
- Replace - Replace
@ -370,27 +556,49 @@ spec:
- DropEqual - DropEqual
type: string type: string
modulus: modulus:
description: "Modulus to take of the hash of the source label values. \n Only applicable when the action is `HashMod`." description: |-
Modulus to take of the hash of the source label values.
Only applicable when the action is `HashMod`.
format: int64 format: int64
type: integer type: integer
regex: regex:
description: Regular expression against which the extracted value is matched. description: Regular expression against which the extracted value is matched.
type: string type: string
replacement: replacement:
description: "Replacement value against which a Replace action is performed if the regular expression matches. \n Regex capture groups are available." description: |-
Replacement value against which a Replace action is performed if the
regular expression matches.
Regex capture groups are available.
type: string type: string
separator: separator:
description: Separator is the string between concatenated SourceLabels. description: Separator is the string between concatenated SourceLabels.
type: string type: string
sourceLabels: sourceLabels:
description: The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression. description: |-
The source labels select values from existing labels. Their content is
concatenated using the configured Separator and matched against the
configured regular expression.
items: items:
description: LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores. description: |-
LabelName is a valid Prometheus label name which may only contain ASCII
letters, numbers, as well as underscores.
pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
type: string type: string
type: array type: array
targetLabel: targetLabel:
description: "Label to which the resulting string is written in a replacement. \n It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. \n Regex capture groups are available." description: |-
Label to which the resulting string is written in a replacement.
It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
`KeepEqual` and `DropEqual` actions.
Regex capture groups are available.
type: string type: string
type: object type: object
type: array type: array
@ -400,34 +608,51 @@ spec:
matchExpressions: matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed. description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
items: items:
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties: properties:
key: key:
description: key is the label key that the selector applies to. description: key is the label key that the selector applies to.
type: string type: string
operator: operator:
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string type: string
values: values:
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object type: object
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: object type: object
staticConfig: staticConfig:
description: 'staticConfig defines the static list of targets to probe and the relabeling configuration. If `ingress` is also defined, `staticConfig` takes precedence. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config.' description: |-
staticConfig defines the static list of targets to probe and the
relabeling configuration.
If `ingress` is also defined, `staticConfig` takes precedence.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config.
properties: properties:
labels: labels:
additionalProperties: additionalProperties:
@ -435,13 +660,29 @@ spec:
description: Labels assigned to all metrics scraped from the targets. description: Labels assigned to all metrics scraped from the targets.
type: object type: object
relabelingConfigs: relabelingConfigs:
description: 'RelabelConfigs to apply to the label set of the targets before it gets scraped. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config' description: |-
RelabelConfigs to apply to the label set of the targets before it gets
scraped.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
items: items:
description: "RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
properties: properties:
action: action:
default: replace default: replace
description: "Action to perform based on the regex matching. \n `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. \n Default: \"Replace\"" description: |-
Action to perform based on the regex matching.
`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
Default: "Replace"
enum: enum:
- replace - replace
- Replace - Replace
@ -467,27 +708,49 @@ spec:
- DropEqual - DropEqual
type: string type: string
modulus: modulus:
description: "Modulus to take of the hash of the source label values. \n Only applicable when the action is `HashMod`." description: |-
Modulus to take of the hash of the source label values.
Only applicable when the action is `HashMod`.
format: int64 format: int64
type: integer type: integer
regex: regex:
description: Regular expression against which the extracted value is matched. description: Regular expression against which the extracted value is matched.
type: string type: string
replacement: replacement:
description: "Replacement value against which a Replace action is performed if the regular expression matches. \n Regex capture groups are available." description: |-
Replacement value against which a Replace action is performed if the
regular expression matches.
Regex capture groups are available.
type: string type: string
separator: separator:
description: Separator is the string between concatenated SourceLabels. description: Separator is the string between concatenated SourceLabels.
type: string type: string
sourceLabels: sourceLabels:
description: The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression. description: |-
The source labels select values from existing labels. Their content is
concatenated using the configured Separator and matched against the
configured regular expression.
items: items:
description: LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores. description: |-
LabelName is a valid Prometheus label name which may only contain ASCII
letters, numbers, as well as underscores.
pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
type: string type: string
type: array type: array
targetLabel: targetLabel:
description: "Label to which the resulting string is written in a replacement. \n It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. \n Regex capture groups are available." description: |-
Label to which the resulting string is written in a replacement.
It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
`KeepEqual` and `DropEqual` actions.
Regex capture groups are available.
type: string type: string
type: object type: object
type: array type: array
@ -511,7 +774,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -527,7 +798,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -547,7 +826,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -563,7 +850,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -583,7 +878,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined

View File

@ -1,11 +1,11 @@
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.73.2/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml # https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
--- ---
apiVersion: apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.13.0 controller-gen.kubebuilder.io/version: v0.15.0
operator.prometheus.io/version: 0.73.2 operator.prometheus.io/version: 0.75.1
argocd.argoproj.io/sync-options: ServerSideApply=true argocd.argoproj.io/sync-options: ServerSideApply=true
name: prometheusrules.monitoring.coreos.com name: prometheusrules.monitoring.coreos.com
spec: spec:
@ -27,10 +27,19 @@ spec:
description: PrometheusRule defines recording and alerting rules for a Prometheus instance description: PrometheusRule defines recording and alerting rules for a Prometheus instance
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -47,28 +56,40 @@ spec:
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
type: string type: string
limit: limit:
description: Limit the number of alerts an alerting rule and series a recording rule can produce. Limit is supported starting with Prometheus >= 2.31 and Thanos Ruler >= 0.24. description: |-
Limit the number of alerts an alerting rule and series a recording
rule can produce.
Limit is supported starting with Prometheus >= 2.31 and Thanos Ruler >= 0.24.
type: integer type: integer
name: name:
description: Name of the rule group. description: Name of the rule group.
minLength: 1 minLength: 1
type: string type: string
partial_response_strategy: partial_response_strategy:
description: 'PartialResponseStrategy is only used by ThanosRuler and will be ignored by Prometheus instances. More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response' description: |-
PartialResponseStrategy is only used by ThanosRuler and will
be ignored by Prometheus instances.
More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response
pattern: ^(?i)(abort|warn)?$ pattern: ^(?i)(abort|warn)?$
type: string type: string
rules: rules:
description: List of alerting and recording rules. description: List of alerting and recording rules.
items: items:
description: 'Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule' description: |-
Rule describes an alerting or recording rule
See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule
properties: properties:
alert: alert:
description: Name of the alert. Must be a valid label value. Only one of `record` and `alert` must be set. description: |-
Name of the alert. Must be a valid label value.
Only one of `record` and `alert` must be set.
type: string type: string
annotations: annotations:
additionalProperties: additionalProperties:
type: string type: string
description: Annotations to add to each alert. Only valid for alerting rules. description: |-
Annotations to add to each alert.
Only valid for alerting rules.
type: object type: object
expr: expr:
anyOf: anyOf:
@ -91,7 +112,9 @@ spec:
description: Labels to add or overwrite. description: Labels to add or overwrite.
type: object type: object
record: record:
description: Name of the time series to output to. Must be a valid metric name. Only one of `record` and `alert` must be set. description: |-
Name of the time series to output to. Must be a valid metric name.
Only one of `record` and `alert` must be set.
type: string type: string
required: required:
- expr - expr

View File

@ -1,11 +1,11 @@
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.73.2/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml # https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
--- ---
apiVersion: apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.13.0 controller-gen.kubebuilder.io/version: v0.15.0
operator.prometheus.io/version: 0.73.2 operator.prometheus.io/version: 0.75.1
argocd.argoproj.io/sync-options: ServerSideApply=true argocd.argoproj.io/sync-options: ServerSideApply=true
name: servicemonitors.monitoring.coreos.com name: servicemonitors.monitoring.coreos.com
spec: spec:
@ -27,34 +27,64 @@ spec:
description: ServiceMonitor defines monitoring for a set of services. description: ServiceMonitor defines monitoring for a set of services.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
spec: spec:
description: Specification of desired Service selection for target discovery by Prometheus. description: |-
Specification of desired Service selection for target discovery by
Prometheus.
properties: properties:
attachMetadata: attachMetadata:
description: "`attachMetadata` defines additional metadata which is added to the discovered targets. \n It requires Prometheus >= v2.37.0." description: |-
`attachMetadata` defines additional metadata which is added to the
discovered targets.
It requires Prometheus >= v2.37.0.
properties: properties:
node: node:
description: When set to true, Prometheus must have the `get` permission on the `Nodes` objects. description: |-
When set to true, Prometheus must have the `get` permission on the
`Nodes` objects.
type: boolean type: boolean
type: object type: object
bodySizeLimit: bodySizeLimit:
description: "When defined, bodySizeLimit specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus. \n It requires Prometheus >= v2.28.0." description: |-
When defined, bodySizeLimit specifies a job level limit on the size
of uncompressed response body that will be accepted by Prometheus.
It requires Prometheus >= v2.28.0.
pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$ pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$
type: string type: string
endpoints: endpoints:
description: List of endpoints part of this ServiceMonitor. description: List of endpoints part of this ServiceMonitor.
items: items:
description: Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus. description: |-
Endpoint defines an endpoint serving Prometheus metrics to be scraped by
Prometheus.
properties: properties:
authorization: authorization:
description: "`authorization` configures the Authorization header credentials to use when scraping the target. \n Cannot be set at the same time as `basicAuth`, or `oauth2`." description: |-
`authorization` configures the Authorization header credentials to use when
scraping the target.
Cannot be set at the same time as `basicAuth`, or `oauth2`.
properties: properties:
credentials: credentials:
description: Selects a key of a Secret in the namespace that contains the credentials for authentication. description: Selects a key of a Secret in the namespace that contains the credentials for authentication.
@ -63,7 +93,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -73,20 +111,42 @@ spec:
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: type:
description: "Defines the authentication type. The value is case-insensitive. \n \"Basic\" is not a supported value. \n Default: \"Bearer\"" description: |-
Defines the authentication type. The value is case-insensitive.
"Basic" is not a supported value.
Default: "Bearer"
type: string type: string
type: object type: object
basicAuth: basicAuth:
description: "`basicAuth` configures the Basic Authentication credentials to use when scraping the target. \n Cannot be set at the same time as `authorization`, or `oauth2`." description: |-
`basicAuth` configures the Basic Authentication credentials to use when
scraping the target.
Cannot be set at the same time as `authorization`, or `oauth2`.
properties: properties:
password: password:
description: '`password` specifies a key of a Secret containing the password for authentication.' description: |-
`password` specifies a key of a Secret containing the password for
authentication.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -96,13 +156,23 @@ spec:
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
username: username:
description: '`username` specifies a key of a Secret containing the username for authentication.' description: |-
`username` specifies a key of a Secret containing the username for
authentication.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -113,16 +183,34 @@ spec:
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: object type: object
bearerTokenFile: bearerTokenFile:
description: "File to read bearer token for scraping the target. \n Deprecated: use `authorization` instead." description: |-
File to read bearer token for scraping the target.
Deprecated: use `authorization` instead.
type: string type: string
bearerTokenSecret: bearerTokenSecret:
description: "`bearerTokenSecret` specifies a key of a Secret containing the bearer token for scraping targets. The secret needs to be in the same namespace as the ServiceMonitor object and readable by the Prometheus Operator. \n Deprecated: use `authorization` instead." description: |-
`bearerTokenSecret` specifies a key of a Secret containing the bearer
token for scraping targets. The secret needs to be in the same namespace
as the ServiceMonitor object and readable by the Prometheus Operator.
Deprecated: use `authorization` instead.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -135,29 +223,62 @@ spec:
description: '`enableHttp2` can be used to disable HTTP2 when scraping the target.' description: '`enableHttp2` can be used to disable HTTP2 when scraping the target.'
type: boolean type: boolean
filterRunning: filterRunning:
description: "When true, the pods which are not running (e.g. either in Failed or Succeeded state) are dropped during the target discovery. \n If unset, the filtering is enabled. \n More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase" description: |-
When true, the pods which are not running (e.g. either in Failed or
Succeeded state) are dropped during the target discovery.
If unset, the filtering is enabled.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
type: boolean type: boolean
followRedirects: followRedirects:
description: '`followRedirects` defines whether the scrape requests should follow HTTP 3xx redirects.' description: |-
`followRedirects` defines whether the scrape requests should follow HTTP
3xx redirects.
type: boolean type: boolean
honorLabels: honorLabels:
description: When true, `honorLabels` preserves the metric's labels when they collide with the target's labels. description: |-
When true, `honorLabels` preserves the metric's labels when they collide
with the target's labels.
type: boolean type: boolean
honorTimestamps: honorTimestamps:
description: '`honorTimestamps` controls whether Prometheus preserves the timestamps when exposed by the target.' description: |-
`honorTimestamps` controls whether Prometheus preserves the timestamps
when exposed by the target.
type: boolean type: boolean
interval: interval:
description: "Interval at which Prometheus scrapes the metrics from the target. \n If empty, Prometheus uses the global scrape interval." description: |-
Interval at which Prometheus scrapes the metrics from the target.
If empty, Prometheus uses the global scrape interval.
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
type: string type: string
metricRelabelings: metricRelabelings:
description: '`metricRelabelings` configures the relabeling rules to apply to the samples before ingestion.' description: |-
`metricRelabelings` configures the relabeling rules to apply to the
samples before ingestion.
items: items:
description: "RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
properties: properties:
action: action:
default: replace default: replace
description: "Action to perform based on the regex matching. \n `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. \n Default: \"Replace\"" description: |-
Action to perform based on the regex matching.
`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
Default: "Replace"
enum: enum:
- replace - replace
- Replace - Replace
@ -183,35 +304,66 @@ spec:
- DropEqual - DropEqual
type: string type: string
modulus: modulus:
description: "Modulus to take of the hash of the source label values. \n Only applicable when the action is `HashMod`." description: |-
Modulus to take of the hash of the source label values.
Only applicable when the action is `HashMod`.
format: int64 format: int64
type: integer type: integer
regex: regex:
description: Regular expression against which the extracted value is matched. description: Regular expression against which the extracted value is matched.
type: string type: string
replacement: replacement:
description: "Replacement value against which a Replace action is performed if the regular expression matches. \n Regex capture groups are available." description: |-
Replacement value against which a Replace action is performed if the
regular expression matches.
Regex capture groups are available.
type: string type: string
separator: separator:
description: Separator is the string between concatenated SourceLabels. description: Separator is the string between concatenated SourceLabels.
type: string type: string
sourceLabels: sourceLabels:
description: The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression. description: |-
The source labels select values from existing labels. Their content is
concatenated using the configured Separator and matched against the
configured regular expression.
items: items:
description: LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores. description: |-
LabelName is a valid Prometheus label name which may only contain ASCII
letters, numbers, as well as underscores.
pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
type: string type: string
type: array type: array
targetLabel: targetLabel:
description: "Label to which the resulting string is written in a replacement. \n It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. \n Regex capture groups are available." description: |-
Label to which the resulting string is written in a replacement.
It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
`KeepEqual` and `DropEqual` actions.
Regex capture groups are available.
type: string type: string
type: object type: object
type: array type: array
oauth2: oauth2:
description: "`oauth2` configures the OAuth2 settings to use when scraping the target. \n It requires Prometheus >= 2.27.0. \n Cannot be set at the same time as `authorization`, or `basicAuth`." description: |-
`oauth2` configures the OAuth2 settings to use when scraping the target.
It requires Prometheus >= 2.27.0.
Cannot be set at the same time as `authorization`, or `basicAuth`.
properties: properties:
clientId: clientId:
description: '`clientId` specifies a key of a Secret or ConfigMap containing the OAuth2 client''s ID.' description: |-
`clientId` specifies a key of a Secret or ConfigMap containing the
OAuth2 client's ID.
properties: properties:
configMap: configMap:
description: ConfigMap containing data to use for the targets. description: ConfigMap containing data to use for the targets.
@ -220,7 +372,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -236,7 +396,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -247,13 +415,23 @@ spec:
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
type: object type: object
clientSecret: clientSecret:
description: '`clientSecret` specifies a key of a Secret containing the OAuth2 client''s secret.' description: |-
`clientSecret` specifies a key of a Secret containing the OAuth2
client's secret.
properties: properties:
key: key:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -265,7 +443,9 @@ spec:
endpointParams: endpointParams:
additionalProperties: additionalProperties:
type: string type: string
description: '`endpointParams` configures the HTTP parameters to append to the token URL.' description: |-
`endpointParams` configures the HTTP parameters to append to the token
URL.
type: object type: object
scopes: scopes:
description: '`scopes` defines the OAuth2 scopes used for the token request.' description: '`scopes` defines the OAuth2 scopes used for the token request.'
@ -289,22 +469,56 @@ spec:
description: params define optional HTTP URL parameters. description: params define optional HTTP URL parameters.
type: object type: object
path: path:
description: "HTTP path from which to scrape for metrics. \n If empty, Prometheus uses the default value (e.g. `/metrics`)." description: |-
HTTP path from which to scrape for metrics.
If empty, Prometheus uses the default value (e.g. `/metrics`).
type: string type: string
port: port:
description: "Name of the Service port which this endpoint refers to. \n It takes precedence over `targetPort`." description: |-
Name of the Service port which this endpoint refers to.
It takes precedence over `targetPort`.
type: string type: string
proxyUrl: proxyUrl:
description: '`proxyURL` configures the HTTP Proxy URL (e.g. "http://proxyserver:2195") to go through when scraping the target.' description: |-
`proxyURL` configures the HTTP Proxy URL (e.g.
"http://proxyserver:2195") to go through when scraping the target.
type: string type: string
relabelings: relabelings:
description: "`relabelings` configures the relabeling rules to apply the target's metadata labels. \n The Operator automatically adds relabelings for a few standard Kubernetes fields. \n The original scrape job's name is available via the `__tmp_prometheus_job_name` label. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
`relabelings` configures the relabeling rules to apply the target's
metadata labels.
The Operator automatically adds relabelings for a few standard Kubernetes fields.
The original scrape job's name is available via the `__tmp_prometheus_job_name` label.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
items: items:
description: "RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" description: |-
RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
properties: properties:
action: action:
default: replace default: replace
description: "Action to perform based on the regex matching. \n `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. \n Default: \"Replace\"" description: |-
Action to perform based on the regex matching.
`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
Default: "Replace"
enum: enum:
- replace - replace
- Replace - Replace
@ -330,45 +544,82 @@ spec:
- DropEqual - DropEqual
type: string type: string
modulus: modulus:
description: "Modulus to take of the hash of the source label values. \n Only applicable when the action is `HashMod`." description: |-
Modulus to take of the hash of the source label values.
Only applicable when the action is `HashMod`.
format: int64 format: int64
type: integer type: integer
regex: regex:
description: Regular expression against which the extracted value is matched. description: Regular expression against which the extracted value is matched.
type: string type: string
replacement: replacement:
description: "Replacement value against which a Replace action is performed if the regular expression matches. \n Regex capture groups are available." description: |-
Replacement value against which a Replace action is performed if the
regular expression matches.
Regex capture groups are available.
type: string type: string
separator: separator:
description: Separator is the string between concatenated SourceLabels. description: Separator is the string between concatenated SourceLabels.
type: string type: string
sourceLabels: sourceLabels:
description: The source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression. description: |-
The source labels select values from existing labels. Their content is
concatenated using the configured Separator and matched against the
configured regular expression.
items: items:
description: LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores. description: |-
LabelName is a valid Prometheus label name which may only contain ASCII
letters, numbers, as well as underscores.
pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
type: string type: string
type: array type: array
targetLabel: targetLabel:
description: "Label to which the resulting string is written in a replacement. \n It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. \n Regex capture groups are available." description: |-
Label to which the resulting string is written in a replacement.
It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
`KeepEqual` and `DropEqual` actions.
Regex capture groups are available.
type: string type: string
type: object type: object
type: array type: array
scheme: scheme:
description: "HTTP scheme to use for scraping. \n `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling. \n If empty, Prometheus uses the default value `http`." description: |-
HTTP scheme to use for scraping.
`http` and `https` are the expected values unless you rewrite the
`__scheme__` label via relabeling.
If empty, Prometheus uses the default value `http`.
enum: enum:
- http - http
- https - https
type: string type: string
scrapeTimeout: scrapeTimeout:
description: "Timeout after which Prometheus considers the scrape to be failed. \n If empty, Prometheus uses the global scrape timeout unless it is less than the target's scrape interval value in which the latter is used." description: |-
Timeout after which Prometheus considers the scrape to be failed.
If empty, Prometheus uses the global scrape timeout unless it is less
than the target's scrape interval value in which the latter is used.
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
type: string type: string
targetPort: targetPort:
anyOf: anyOf:
- type: integer - type: integer
- type: string - type: string
description: Name or number of the target port of the `Pod` object behind the Service. The port must be specified with the container's port property. description: |-
Name or number of the target port of the `Pod` object behind the
Service. The port must be specified with the container's port property.
x-kubernetes-int-or-string: true x-kubernetes-int-or-string: true
tlsConfig: tlsConfig:
description: TLS configuration to use when scraping the target. description: TLS configuration to use when scraping the target.
@ -383,7 +634,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -399,7 +658,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -422,7 +689,15 @@ spec:
description: The key to select. description: The key to select.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the ConfigMap or its key must be defined description: Specify whether the ConfigMap or its key must be defined
@ -438,7 +713,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -464,7 +747,15 @@ spec:
description: The key of the secret to select from. Must be a valid secret key. description: The key of the secret to select from. Must be a valid secret key.
type: string type: string
name: 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?' default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string type: string
optional: optional:
description: Specify whether the Secret or its key must be defined description: Specify whether the Secret or its key must be defined
@ -478,34 +769,73 @@ spec:
type: string type: string
type: object type: object
trackTimestampsStaleness: trackTimestampsStaleness:
description: "`trackTimestampsStaleness` defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data. Has no effect if `honorTimestamps` is false. \n It requires Prometheus >= v2.48.0." description: |-
`trackTimestampsStaleness` defines whether Prometheus tracks staleness of
the metrics that have an explicit timestamp present in scraped data.
Has no effect if `honorTimestamps` is false.
It requires Prometheus >= v2.48.0.
type: boolean type: boolean
type: object type: object
type: array type: array
jobLabel: jobLabel:
description: "`jobLabel` selects the label from the associated Kubernetes `Service` object which will be used as the `job` label for all metrics. \n For example if `jobLabel` is set to `foo` and the Kubernetes `Service` object is labeled with `foo: bar`, then Prometheus adds the `job=\"bar\"` label to all ingested metrics. \n If the value of this field is empty or if the label doesn't exist for the given Service, the `job` label of the metrics defaults to the name of the associated Kubernetes `Service`." description: |-
`jobLabel` selects the label from the associated Kubernetes `Service`
object which will be used as the `job` label for all metrics.
For example if `jobLabel` is set to `foo` and the Kubernetes `Service`
object is labeled with `foo: bar`, then Prometheus adds the `job="bar"`
label to all ingested metrics.
If the value of this field is empty or if the label doesn't exist for
the given Service, the `job` label of the metrics defaults to the name
of the associated Kubernetes `Service`.
type: string type: string
keepDroppedTargets: keepDroppedTargets:
description: "Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit. \n It requires Prometheus >= v2.47.0." description: |-
Per-scrape limit on the number of targets dropped by relabeling
that will be kept in memory. 0 means no limit.
It requires Prometheus >= v2.47.0.
format: int64 format: int64
type: integer type: integer
labelLimit: labelLimit:
description: "Per-scrape limit on number of labels that will be accepted for a sample. \n It requires Prometheus >= v2.27.0." description: |-
Per-scrape limit on number of labels that will be accepted for a sample.
It requires Prometheus >= v2.27.0.
format: int64 format: int64
type: integer type: integer
labelNameLengthLimit: labelNameLengthLimit:
description: "Per-scrape limit on length of labels name that will be accepted for a sample. \n It requires Prometheus >= v2.27.0." description: |-
Per-scrape limit on length of labels name that will be accepted for a sample.
It requires Prometheus >= v2.27.0.
format: int64 format: int64
type: integer type: integer
labelValueLengthLimit: labelValueLengthLimit:
description: "Per-scrape limit on length of labels value that will be accepted for a sample. \n It requires Prometheus >= v2.27.0." description: |-
Per-scrape limit on length of labels value that will be accepted for a sample.
It requires Prometheus >= v2.27.0.
format: int64 format: int64
type: integer type: integer
namespaceSelector: namespaceSelector:
description: Selector to select which namespaces the Kubernetes `Endpoints` objects are discovered from. description: |-
Selector to select which namespaces the Kubernetes `Endpoints` objects
are discovered from.
properties: properties:
any: any:
description: Boolean describing whether all namespaces are selected in contrast to a list restricting them. description: |-
Boolean describing whether all namespaces are selected in contrast to a
list restricting them.
type: boolean type: boolean
matchNames: matchNames:
description: List of namespace names to select from. description: List of namespace names to select from.
@ -514,12 +844,16 @@ spec:
type: array type: array
type: object type: object
podTargetLabels: podTargetLabels:
description: '`podTargetLabels` defines the labels which are transferred from the associated Kubernetes `Pod` object onto the ingested metrics.' description: |-
`podTargetLabels` defines the labels which are transferred from the
associated Kubernetes `Pod` object onto the ingested metrics.
items: items:
type: string type: string
type: array type: array
sampleLimit: sampleLimit:
description: '`sampleLimit` defines a per-scrape limit on the number of scraped samples that will be accepted.' description: |-
`sampleLimit` defines a per-scrape limit on the number of scraped samples
that will be accepted.
format: int64 format: int64
type: integer type: integer
scrapeClass: scrapeClass:
@ -527,9 +861,23 @@ spec:
minLength: 1 minLength: 1
type: string type: string
scrapeProtocols: scrapeProtocols:
description: "`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the protocols supported by Prometheus in order of preference (from most to least preferred). \n If unset, Prometheus uses its default value. \n It requires Prometheus >= v2.49.0." description: |-
`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the
protocols supported by Prometheus in order of preference (from most to least preferred).
If unset, Prometheus uses its default value.
It requires Prometheus >= v2.49.0.
items: items:
description: 'ScrapeProtocol represents a protocol used by Prometheus for scraping metrics. Supported values are: * `OpenMetricsText0.0.1` * `OpenMetricsText1.0.0` * `PrometheusProto` * `PrometheusText0.0.4`' description: |-
ScrapeProtocol represents a protocol used by Prometheus for scraping metrics.
Supported values are:
* `OpenMetricsText0.0.1`
* `OpenMetricsText1.0.0`
* `PrometheusProto`
* `PrometheusText0.0.4`
enum: enum:
- PrometheusProto - PrometheusProto
- OpenMetricsText0.0.1 - OpenMetricsText0.0.1
@ -544,38 +892,55 @@ spec:
matchExpressions: matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed. description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
items: items:
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties: properties:
key: key:
description: key is the label key that the selector applies to. description: key is the label key that the selector applies to.
type: string type: string
operator: operator:
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string type: string
values: values:
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object type: object
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
targetLabels: targetLabels:
description: '`targetLabels` defines the labels which are transferred from the associated Kubernetes `Service` object onto the ingested metrics.' description: |-
`targetLabels` defines the labels which are transferred from the
associated Kubernetes `Service` object onto the ingested metrics.
items: items:
type: string type: string
type: array type: array
targetLimit: targetLimit:
description: '`targetLimit` defines a limit on the number of scraped targets that will be accepted.' description: |-
`targetLimit` defines a limit on the number of scraped targets that will
be accepted.
format: int64 format: int64
type: integer type: integer
required: required:

View File

@ -6,7 +6,7 @@ annotations:
- name: Upstream Project - name: Upstream Project
url: https://github.com/grafana/grafana url: https://github.com/grafana/grafana
apiVersion: v2 apiVersion: v2
appVersion: 10.4.1 appVersion: 11.1.0
description: The leading tool for querying and visualizing time series and metrics. description: The leading tool for querying and visualizing time series and metrics.
home: https://grafana.com home: https://grafana.com
icon: https://artifacthub.io/image/b4fed1a7-6c8f-4945-b99d-096efa3e4116 icon: https://artifacthub.io/image/b4fed1a7-6c8f-4945-b99d-096efa3e4116
@ -25,9 +25,11 @@ maintainers:
name: Xtigyro name: Xtigyro
- email: mail@torstenwalter.de - email: mail@torstenwalter.de
name: torstenwalter name: torstenwalter
- email: github@jkroepke.de
name: jkroepke
name: grafana name: grafana
sources: sources:
- https://github.com/grafana/grafana - https://github.com/grafana/grafana
- https://github.com/grafana/helm-charts - https://github.com/grafana/helm-charts
type: application type: application
version: 7.3.11 version: 8.3.4

View File

@ -73,6 +73,8 @@ need to instead set `global.imageRegistry`.
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Image pull secrets (can be templated) | `[]` | | `image.pullSecrets` | Image pull secrets (can be templated) | `[]` |
| `service.enabled` | Enable grafana service | `true` | | `service.enabled` | Enable grafana service | `true` |
| `service.ipFamilies` | Kubernetes service IP families | `[]` |
| `service.ipFamilyPolicy` | Kubernetes service IP family policy | `""` |
| `service.type` | Kubernetes service type | `ClusterIP` | | `service.type` | Kubernetes service type | `ClusterIP` |
| `service.port` | Kubernetes port where service is exposed | `80` | | `service.port` | Kubernetes port where service is exposed | `80` |
| `service.portName` | Name of the port on the service | `service` | | `service.portName` | Name of the port on the service | `service` |
@ -119,6 +121,7 @@ need to instead set `global.imageRegistry`.
| `persistence.subPath` | Mount a sub dir of the persistent volume (can be templated) | `nil` | | `persistence.subPath` | Mount a sub dir of the persistent volume (can be templated) | `nil` |
| `persistence.inMemory.enabled` | If persistence is not enabled, whether to mount the local storage in-memory to improve performance | `false` | | `persistence.inMemory.enabled` | If persistence is not enabled, whether to mount the local storage in-memory to improve performance | `false` |
| `persistence.inMemory.sizeLimit` | SizeLimit for the in-memory local storage | `nil` | | `persistence.inMemory.sizeLimit` | SizeLimit for the in-memory local storage | `nil` |
| `persistence.disableWarning` | Hide NOTES warning, useful when persiting to a database | `false` |
| `initChownData.enabled` | If false, don't reset data ownership at startup | true | | `initChownData.enabled` | If false, don't reset data ownership at startup | true |
| `initChownData.image.registry` | init-chown-data container image registry | `docker.io` | | `initChownData.image.registry` | init-chown-data container image registry | `docker.io` |
| `initChownData.image.repository` | init-chown-data container image repository | `busybox` | | `initChownData.image.repository` | init-chown-data container image repository | `busybox` |
@ -183,6 +186,7 @@ need to instead set `global.imageRegistry`.
| `sidecar.dashboards.provider.name` | Unique name of the grafana provider | `sidecarProvider` | | `sidecar.dashboards.provider.name` | Unique name of the grafana provider | `sidecarProvider` |
| `sidecar.dashboards.provider.orgid` | Id of the organisation, to which the dashboards should be added | `1` | | `sidecar.dashboards.provider.orgid` | Id of the organisation, to which the dashboards should be added | `1` |
| `sidecar.dashboards.provider.folder` | Logical folder in which grafana groups dashboards | `""` | | `sidecar.dashboards.provider.folder` | Logical folder in which grafana groups dashboards | `""` |
| `sidecar.dashboards.provider.folderUid` | Allows you to specify the static UID for the logical folder above | `""` |
| `sidecar.dashboards.provider.disableDelete` | Activate to avoid the deletion of imported dashboards | `false` | | `sidecar.dashboards.provider.disableDelete` | Activate to avoid the deletion of imported dashboards | `false` |
| `sidecar.dashboards.provider.allowUiUpdates` | Allow updating provisioned dashboards from the UI | `false` | | `sidecar.dashboards.provider.allowUiUpdates` | Allow updating provisioned dashboards from the UI | `false` |
| `sidecar.dashboards.provider.type` | Provider type | `file` | | `sidecar.dashboards.provider.type` | Provider type | `file` |
@ -273,9 +277,13 @@ need to instead set `global.imageRegistry`.
| `imageRenderer.image.pullPolicy` | image-renderer ImagePullPolicy | `Always` | | `imageRenderer.image.pullPolicy` | image-renderer ImagePullPolicy | `Always` |
| `imageRenderer.env` | extra env-vars for image-renderer | `{}` | | `imageRenderer.env` | extra env-vars for image-renderer | `{}` |
| `imageRenderer.envValueFrom` | Environment variables for image-renderer from alternate sources. See the API docs on [EnvVarSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#envvarsource-v1-core) for format details. Can be templated | `{}` | | `imageRenderer.envValueFrom` | Environment variables for image-renderer from alternate sources. See the API docs on [EnvVarSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#envvarsource-v1-core) for format details. Can be templated | `{}` |
| `imageRenderer.extraConfigmapMounts` | Additional image-renderer configMap volume mounts (values are templated) | `[]` |
| `imageRenderer.extraSecretMounts` | Additional image-renderer secret volume mounts | `[]` |
| `imageRenderer.extraVolumeMounts` | Additional image-renderer volume mounts | `[]` |
| `imageRenderer.extraVolumes` | Additional image-renderer volumes | `[]` |
| `imageRenderer.serviceAccountName` | image-renderer deployment serviceAccountName | `""` | | `imageRenderer.serviceAccountName` | image-renderer deployment serviceAccountName | `""` |
| `imageRenderer.securityContext` | image-renderer deployment securityContext | `{}` | | `imageRenderer.securityContext` | image-renderer deployment securityContext | `{}` |
| `imageRenderer.podAnnotations ` | image-renderer image-renderer pod annotation | `{}` | | `imageRenderer.podAnnotations` | image-renderer image-renderer pod annotation | `{}` |
| `imageRenderer.hostAliases` | image-renderer deployment Host Aliases | `[]` | | `imageRenderer.hostAliases` | image-renderer deployment Host Aliases | `[]` |
| `imageRenderer.priorityClassName` | image-renderer deployment priority class | `''` | | `imageRenderer.priorityClassName` | image-renderer deployment priority class | `''` |
| `imageRenderer.service.enabled` | Enable the image-renderer service | `true` | | `imageRenderer.service.enabled` | Enable the image-renderer service | `true` |
@ -437,6 +445,7 @@ Secrets are recommended over configmaps for this usecase because datasources usu
data like usernames and passwords. Secrets are the more appropriate cluster resource to manage those. data like usernames and passwords. Secrets are the more appropriate cluster resource to manage those.
Example values to add a postgres datasource as a kubernetes secret: Example values to add a postgres datasource as a kubernetes secret:
```yaml ```yaml
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@ -591,6 +600,7 @@ To delete provisioned alert rules is a two step process, you need to delete the
and then create a configuration which deletes the alert rule. and then create a configuration which deletes the alert rule.
Example deletion configuration: Example deletion configuration:
```yaml ```yaml
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -608,6 +618,7 @@ data:
``` ```
## Statically provision alerting resources ## Statically provision alerting resources
If you don't need to change alerting resources (alert rules, contact points, notification policies and notification templates) regularly you could use the `alerting` config option instead of the sidecar option above. If you don't need to change alerting resources (alert rules, contact points, notification policies and notification templates) regularly you could use the `alerting` config option instead of the sidecar option above.
This will grab the alerting config and apply it statically at build time for the helm file. This will grab the alerting config and apply it statically at build time for the helm file.

View File

@ -17,3 +17,91 @@ imageRenderer:
requests: requests:
cpu: 500m cpu: 500m
memory: 50Mi memory: 50Mi
extraVolumes:
- name: empty-renderer-volume
emtpyDir: {}
extraVolumeMounts:
- mountPath: /tmp/renderer
name: empty-renderer-volume
extraConfigmapMounts:
- name: renderer-config
mountPath: /usr/src/app/config.json
subPath: renderer-config.json
configMap: image-renderer-config
extraSecretMounts:
- name: renderer-certificate
mountPath: /usr/src/app/certs/
secretName: image-renderer-certificate
readOnly: true
extraObjects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: image-renderer-config
data:
renderer-config.json: |
{
"service": {
"host": null,
"port": 8081,
"protocol": "http",
"certFile": "",
"certKey": "",
"metrics": {
"enabled": true,
"collectDefaultMetrics": true,
"requestDurationBuckets": [1, 5, 7, 9, 11, 13, 15, 20, 30]
},
"logging": {
"level": "info",
"console": {
"json": true,
"colorize": false
}
},
"security": {
"authToken": "-"
}
},
"rendering": {
"chromeBin": null,
"args": ["--no-sandbox", "--disable-gpu"],
"ignoresHttpsErrors": false,
"timezone": null,
"acceptLanguage": null,
"width": 1000,
"height": 500,
"deviceScaleFactor": 1,
"maxWidth": 3080,
"maxHeight": 3000,
"maxDeviceScaleFactor": 4,
"pageZoomLevel": 1,
"headed": false,
"mode": "default",
"emulateNetworkConditions": false,
"clustering": {
"monitor": false,
"mode": "browser",
"maxConcurrency": 5,
"timeout": 30
},
"verboseLogging": false,
"dumpio": false,
"timingMetrics": false
}
}
- apiVersion: v1
kind: Secret
metadata:
name: image-renderer-certificate
type: Opaque
data:
# Decodes to 'PLACEHOLDER CERTIFICATE'
not-a-real-certificate: UExBQ0VIT0xERVIgQ0VSVElGSUNBVEU=

View File

@ -0,0 +1,38 @@
extraObjects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: '{{ include "grafana.fullname" . }}-test'
data:
var1: "value1"
- apiVersion: v1
kind: Secret
metadata:
name: '{{ include "grafana.fullname" . }}-test'
type: Opaque
data:
var2: "dmFsdWUy"
sidecar:
dashboards:
enabled: true
envValueFrom:
VAR1:
configMapKeyRef:
name: '{{ include "grafana.fullname" . }}-test'
key: var1
VAR2:
secretKeyRef:
name: '{{ include "grafana.fullname" . }}-test'
key: var2
datasources:
enabled: true
envValueFrom:
VAR1:
configMapKeyRef:
name: '{{ include "grafana.fullname" . }}-test'
key: var1
VAR2:
secretKeyRef:
name: '{{ include "grafana.fullname" . }}-test'
key: var2

View File

@ -47,7 +47,7 @@
3. Login with the password from step 1 and the username: {{ .Values.adminUser }} 3. Login with the password from step 1 and the username: {{ .Values.adminUser }}
{{- if not .Values.persistence.enabled }} {{- if and (not .Values.persistence.enabled) (not .Values.persistence.disableWarning) }}
################################################################################# #################################################################################
###### WARNING: Persistence is disabled!!! You will lose your data when ##### ###### WARNING: Persistence is disabled!!! You will lose your data when #####
###### the Grafana pod is terminated. ##### ###### the Grafana pod is terminated. #####

View File

@ -146,6 +146,7 @@ provider.yaml: |-
orgId: {{ .Values.sidecar.dashboards.provider.orgid }} orgId: {{ .Values.sidecar.dashboards.provider.orgid }}
{{- if not .Values.sidecar.dashboards.provider.foldersFromFilesStructure }} {{- if not .Values.sidecar.dashboards.provider.foldersFromFilesStructure }}
folder: '{{ .Values.sidecar.dashboards.provider.folder }}' folder: '{{ .Values.sidecar.dashboards.provider.folder }}'
folderUid: '{{ .Values.sidecar.dashboards.provider.folderUid }}'
{{- end }} {{- end }}
type: {{ .Values.sidecar.dashboards.provider.type }} type: {{ .Values.sidecar.dashboards.provider.type }}
disableDeletion: {{ .Values.sidecar.dashboards.provider.disableDelete }} disableDeletion: {{ .Values.sidecar.dashboards.provider.disableDelete }}

View File

@ -192,6 +192,11 @@ initContainers:
- name: "{{ $key }}" - name: "{{ $key }}"
value: "{{ $value }}" value: "{{ $value }}"
{{- end }} {{- end }}
{{- range $key, $value := .Values.sidecar.datasources.envValueFrom }}
- name: {{ $key | quote }}
valueFrom:
{{- tpl (toYaml $value) $ | nindent 10 }}
{{- end }}
{{- if .Values.sidecar.datasources.ignoreAlreadyProcessed }} {{- if .Values.sidecar.datasources.ignoreAlreadyProcessed }}
- name: IGNORE_ALREADY_PROCESSED - name: IGNORE_ALREADY_PROCESSED
value: "true" value: "true"
@ -434,7 +439,7 @@ containers:
- name: "{{ $key }}" - name: "{{ $key }}"
value: "{{ $value }}" value: "{{ $value }}"
{{- end }} {{- end }}
{{- range $key, $value := .Values.sidecar.datasources.envValueFrom }} {{- range $key, $value := .Values.sidecar.dashboards.envValueFrom }}
- name: {{ $key | quote }} - name: {{ $key | quote }}
valueFrom: valueFrom:
{{- tpl (toYaml $value) $ | nindent 10 }} {{- tpl (toYaml $value) $ | nindent 10 }}
@ -550,6 +555,11 @@ containers:
- name: "{{ $key }}" - name: "{{ $key }}"
value: "{{ $value }}" value: "{{ $value }}"
{{- end }} {{- end }}
{{- range $key, $value := .Values.sidecar.datasources.envValueFrom }}
- name: {{ $key | quote }}
valueFrom:
{{- tpl (toYaml $value) $ | nindent 10 }}
{{- end }}
{{- if .Values.sidecar.datasources.ignoreAlreadyProcessed }} {{- if .Values.sidecar.datasources.ignoreAlreadyProcessed }}
- name: IGNORE_ALREADY_PROCESSED - name: IGNORE_ALREADY_PROCESSED
value: "true" value: "true"

View File

@ -6,9 +6,14 @@ metadata:
namespace: {{ include "grafana.namespace" . }} namespace: {{ include "grafana.namespace" . }}
labels: labels:
{{- include "grafana.labels" . | nindent 4 }} {{- include "grafana.labels" . | nindent 4 }}
{{- with .Values.annotations }} {{- if or .Values.configMapAnnotations .Values.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.configMapAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }} {{- end }}
data: data:
{{- include "grafana.configData" . | nindent 2 }} {{- include "grafana.configData" . | nindent 2 }}

View File

@ -109,6 +109,24 @@ spec:
volumeMounts: volumeMounts:
- mountPath: /tmp - mountPath: /tmp
name: image-renderer-tmpfs name: image-renderer-tmpfs
{{- range .Values.imageRenderer.extraConfigmapMounts }}
- name: {{ tpl .name $root }}
mountPath: {{ tpl .mountPath $root }}
subPath: {{ tpl (.subPath | default "") $root }}
readOnly: {{ .readOnly }}
{{- end }}
{{- range .Values.imageRenderer.extraSecretMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
subPath: {{ .subPath | default "" }}
{{- end }}
{{- range .Values.imageRenderer.extraVolumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath | default "" }}
readOnly: {{ .readOnly }}
{{- end }}
{{- with .Values.imageRenderer.resources }} {{- with .Values.imageRenderer.resources }}
resources: resources:
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
@ -128,4 +146,54 @@ spec:
volumes: volumes:
- name: image-renderer-tmpfs - name: image-renderer-tmpfs
emptyDir: {} emptyDir: {}
{{- range .Values.imageRenderer.extraConfigmapMounts }}
- name: {{ tpl .name $root }}
configMap:
name: {{ tpl .configMap $root }}
{{- with .items }}
items:
{{- toYaml . | nindent 14 }}
{{- end }}
{{- end }}
{{- range .Values.imageRenderer.extraSecretMounts }}
{{- if .secretName }}
- name: {{ .name }}
secret:
secretName: {{ .secretName }}
defaultMode: {{ .defaultMode }}
{{- with .items }}
items:
{{- toYaml . | nindent 14 }}
{{- end }}
{{- else if .projected }}
- name: {{ .name }}
projected:
{{- toYaml .projected | nindent 12 }}
{{- else if .csi }}
- name: {{ .name }}
csi:
{{- toYaml .csi | nindent 12 }}
{{- end }}
{{- end }}
{{- range .Values.imageRenderer.extraVolumes }}
- name: {{ .name }}
{{- if .existingClaim }}
persistentVolumeClaim:
claimName: {{ .existingClaim }}
{{- else if .hostPath }}
hostPath:
{{ toYaml .hostPath | nindent 12 }}
{{- else if .csi }}
csi:
{{- toYaml .csi | nindent 12 }}
{{- else if .configMap }}
configMap:
{{- toYaml .configMap | nindent 12 }}
{{- else if .emptyDir }}
emptyDir:
{{- toYaml .emptyDir | nindent 12 }}
{{- else }}
emptyDir: {}
{{- end }}
{{- end }}
{{- end }} {{- end }}

View File

@ -69,7 +69,7 @@ spec:
to: to:
- namespaceSelector: - namespaceSelector:
matchLabels: matchLabels:
name: {{ include "grafana.namespace" . }} kubernetes.io/metadata.name: {{ include "grafana.namespace" . }}
podSelector: podSelector:
matchLabels: matchLabels:
{{- include "grafana.selectorLabels" . | nindent 14 }} {{- include "grafana.selectorLabels" . | nindent 14 }}

View File

@ -25,7 +25,7 @@ spec:
resources: resources:
requests: requests:
storage: {{ .Values.persistence.size | quote }} storage: {{ .Values.persistence.size | quote }}
{{- if (lookup "v1" "PersistentVolumeClaim" (include "grafana.namespace" .) (include "grafana.fullname" .)) }} {{- if and (.Values.persistence.lookupVolumeName) (lookup "v1" "PersistentVolumeClaim" (include "grafana.namespace" .) (include "grafana.fullname" .)) }}
volumeName: {{ (lookup "v1" "PersistentVolumeClaim" (include "grafana.namespace" .) (include "grafana.fullname" .)).spec.volumeName }} volumeName: {{ (lookup "v1" "PersistentVolumeClaim" (include "grafana.namespace" .) (include "grafana.fullname" .)).spec.volumeName }}
{{- end }} {{- end }}
{{- with .Values.persistence.storageClassName }} {{- with .Values.persistence.storageClassName }}

View File

@ -35,6 +35,12 @@ spec:
{{- else }} {{- else }}
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
{{- end }} {{- end }}
{{- if .Values.service.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
{{- end }}
{{- if .Values.service.ipFamilies }}
ipFamilies: {{ .Values.service.ipFamilies | toYaml | nindent 2 }}
{{- end }}
{{- with .Values.service.externalIPs }} {{- with .Values.service.externalIPs }}
externalIPs: externalIPs:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}

View File

@ -4,7 +4,7 @@ global:
# To help compatibility with other charts which use global.imagePullSecrets. # To help compatibility with other charts which use global.imagePullSecrets.
# Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). # Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style).
# Can be tempalted. # Can be templated.
# global: # global:
# imagePullSecrets: # imagePullSecrets:
# - name: pullSecret1 # - name: pullSecret1
@ -205,6 +205,10 @@ downloadDashboards:
## Pod Annotations ## Pod Annotations
# podAnnotations: {} # podAnnotations: {}
## ConfigMap Annotations
# configMapAnnotations: {}
# argocd.argoproj.io/sync-options: Replace=true
## Pod Labels ## Pod Labels
# podLabels: {} # podLabels: {}
@ -220,6 +224,10 @@ gossipPortName: gossip
service: service:
enabled: true enabled: true
type: ClusterIP type: ClusterIP
# Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services)
ipFamilyPolicy: ""
# Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6.
ipFamilies: []
loadBalancerIP: "" loadBalancerIP: ""
loadBalancerClass: "" loadBalancerClass: ""
loadBalancerSourceRanges: [] loadBalancerSourceRanges: []
@ -234,7 +242,7 @@ service:
appProtocol: "" appProtocol: ""
serviceMonitor: serviceMonitor:
## If true, a ServiceMonitor CRD is created for a prometheus operator ## If true, a ServiceMonitor CR is created for a prometheus operator
## https://github.com/coreos/prometheus-operator ## https://github.com/coreos/prometheus-operator
## ##
enabled: false enabled: false
@ -377,6 +385,7 @@ persistence:
# existingClaim: # existingClaim:
## Extra labels to apply to a PVC. ## Extra labels to apply to a PVC.
extraPvcLabels: {} extraPvcLabels: {}
disableWarning: false
## If persistence is not enabled, this allows to mount the ## If persistence is not enabled, this allows to mount the
## local storage in-memory to improve performance ## local storage in-memory to improve performance
@ -389,6 +398,10 @@ persistence:
## ##
# sizeLimit: 300Mi # sizeLimit: 300Mi
## If 'lookupVolumeName' is set to true, Helm will attempt to retrieve
## the current value of 'spec.volumeName' and incorporate it into the template.
lookupVolumeName: true
initChownData: initChownData:
## If false, data ownership will not be reset at startup ## If false, data ownership will not be reset at startup
## This allows the grafana-server to be run with an arbitrary user ## This allows the grafana-server to be run with an arbitrary user
@ -916,6 +929,19 @@ sidecar:
enabled: false enabled: false
# Additional environment variables for the dashboards sidecar # Additional environment variables for the dashboards sidecar
env: {} env: {}
## "valueFrom" environment variable references that will be added to deployment pods. Name is templated.
## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvarsource-v1-core
## Renders in container spec as:
## env:
## ...
## - name: <key>
## valueFrom:
## <value rendered as YAML>
envValueFrom: {}
# ENV_NAME:
# configMapKeyRef:
# name: configmap-name
# key: value_key
# Do not reprocess already processed unchanged resources on k8s API reconnect. # Do not reprocess already processed unchanged resources on k8s API reconnect.
# ignoreAlreadyProcessed: true # ignoreAlreadyProcessed: true
SCProvider: true SCProvider: true
@ -963,6 +989,8 @@ sidecar:
orgid: 1 orgid: 1
# folder in which the dashboards should be imported in grafana # folder in which the dashboards should be imported in grafana
folder: '' folder: ''
# <string> folder UID. will be automatically generated if not specified
folderUid: ''
# type of the provider # type of the provider
type: file type: file
# disableDelete to activate a import-only behaviour # disableDelete to activate a import-only behaviour
@ -979,7 +1007,19 @@ sidecar:
enabled: false enabled: false
# Additional environment variables for the datasourcessidecar # Additional environment variables for the datasourcessidecar
env: {} env: {}
## "valueFrom" environment variable references that will be added to deployment pods. Name is templated.
## ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvarsource-v1-core
## Renders in container spec as:
## env:
## ...
## - name: <key>
## valueFrom:
## <value rendered as YAML>
envValueFrom: {} envValueFrom: {}
# ENV_NAME:
# configMapKeyRef:
# name: configmap-name
# key: value_key
# Do not reprocess already processed unchanged resources on k8s API reconnect. # Do not reprocess already processed unchanged resources on k8s API reconnect.
# ignoreAlreadyProcessed: true # ignoreAlreadyProcessed: true
# label that the configmaps with datasources are marked with # label that the configmaps with datasources are marked with
@ -1237,6 +1277,18 @@ imageRenderer:
## ##
# schedulerName: "default-scheduler" # schedulerName: "default-scheduler"
# Extra configmaps to mount in image-renderer pods
extraConfigmapMounts: []
# Extra secrets to mount in image-renderer pods
extraSecretMounts: []
# Extra volumes to mount in image-renderer pods
extraVolumeMounts: []
# Extra volumes for image-renderer pods
extraVolumes: []
networkPolicy: networkPolicy:
## @param networkPolicy.enabled Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now. ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now.
## ##

View File

@ -23,4 +23,4 @@ name: kube-state-metrics
sources: sources:
- https://github.com/kubernetes/kube-state-metrics/ - https://github.com/kubernetes/kube-state-metrics/
type: application type: application
version: 5.19.0 version: 5.21.0

View File

@ -36,6 +36,7 @@ spec:
{{ toYaml .Values.podAnnotations | indent 8 }} {{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }} {{- end }}
spec: spec:
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
hostNetwork: {{ .Values.hostNetwork }} hostNetwork: {{ .Values.hostNetwork }}
serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }} serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }}
{{- if .Values.securityContext.enabled }} {{- if .Values.securityContext.enabled }}
@ -182,10 +183,8 @@ spec:
periodSeconds: {{ .Values.readinessProbe.periodSeconds }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }} successThreshold: {{ .Values.readinessProbe.successThreshold }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
{{- if .Values.resources }}
resources: resources:
{{ toYaml .Values.resources | indent 10 }} {{ toYaml .Values.resources | indent 10 }}
{{- end }}
{{- if .Values.containerSecurityContext }} {{- if .Values.containerSecurityContext }}
securityContext: securityContext:
{{ toYaml .Values.containerSecurityContext | indent 10 }} {{ toYaml .Values.containerSecurityContext | indent 10 }}

View File

@ -1,6 +1,7 @@
{{- if .Values.serviceAccount.create -}} {{- if .Values.serviceAccount.create -}}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
metadata: metadata:
labels: labels:
{{- include "kube-state-metrics.labels" . | indent 4 }} {{- include "kube-state-metrics.labels" . | indent 4 }}

View File

@ -40,79 +40,79 @@ spec:
{{- end }} {{- end }}
endpoints: endpoints:
- port: http - port: http
{{- if .Values.prometheus.monitor.interval }} {{- if or .Values.prometheus.monitor.http.interval .Values.prometheus.monitor.interval }}
interval: {{ .Values.prometheus.monitor.interval }} interval: {{ .Values.prometheus.monitor.http.interval | default .Values.prometheus.monitor.interval }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.scrapeTimeout }} {{- if or .Values.prometheus.monitor.http.scrapeTimeout .Values.prometheus.monitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }} scrapeTimeout: {{ .Values.prometheus.monitor.http.scrapeTimeout | default .Values.prometheus.monitor.scrapeTimeout }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.proxyUrl }} {{- if or .Values.prometheus.monitor.http.proxyUrl .Values.prometheus.monitor.proxyUrl }}
proxyUrl: {{ .Values.prometheus.monitor.proxyUrl}} proxyUrl: {{ .Values.prometheus.monitor.http.proxyUrl | default .Values.prometheus.monitor.proxyUrl }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.enableHttp2 }} {{- if or .Values.prometheus.monitor.http.enableHttp2 .Values.prometheus.monitor.enableHttp2 }}
enableHttp2: {{ .Values.prometheus.monitor.enableHttp2}} enableHttp2: {{ .Values.prometheus.monitor.http.enableHttp2 | default .Values.prometheus.monitor.enableHttp2 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.honorLabels }} {{- if or .Values.prometheus.monitor.http.honorLabels .Values.prometheus.monitor.honorLabels }}
honorLabels: true honorLabels: true
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.metricRelabelings }} {{- if or .Values.prometheus.monitor.http.metricRelabelings .Values.prometheus.monitor.metricRelabelings }}
metricRelabelings: metricRelabelings:
{{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }} {{- toYaml (.Values.prometheus.monitor.http.metricRelabelings | default .Values.prometheus.monitor.metricRelabelings) | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.relabelings }} {{- if or .Values.prometheus.monitor.http.relabelings .Values.prometheus.monitor.relabelings }}
relabelings: relabelings:
{{- toYaml .Values.prometheus.monitor.relabelings | nindent 8 }} {{- toYaml (.Values.prometheus.monitor.http.relabelings | default .Values.prometheus.monitor.relabelings) | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.scheme }} {{- if or .Values.prometheus.monitor.http.scheme .Values.prometheus.monitor.scheme }}
scheme: {{ .Values.prometheus.monitor.scheme }} scheme: {{ .Values.prometheus.monitor.http.scheme | default .Values.prometheus.monitor.scheme }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.tlsConfig }} {{- if or .Values.prometheus.monitor.http.tlsConfig .Values.prometheus.monitor.tlsConfig }}
tlsConfig: tlsConfig:
{{- toYaml .Values.prometheus.monitor.tlsConfig | nindent 8 }} {{- toYaml (.Values.prometheus.monitor.http.tlsConfig | default .Values.prometheus.monitor.tlsConfig) | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.bearerTokenFile }} {{- if or .Values.prometheus.monitor.http.bearerTokenFile .Values.prometheus.monitor.bearerTokenFile }}
bearerTokenFile: {{ .Values.prometheus.monitor.bearerTokenFile }} bearerTokenFile: {{ .Values.prometheus.monitor.http.bearerTokenFile | default .Values.prometheus.monitor.bearerTokenFile }}
{{- end }} {{- end }}
{{- with .Values.prometheus.monitor.bearerTokenSecret }} {{- with (.Values.prometheus.monitor.http.bearerTokenSecret | default .Values.prometheus.monitor.bearerTokenSecret) }}
bearerTokenSecret: bearerTokenSecret:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.selfMonitor.enabled }} {{- if .Values.selfMonitor.enabled }}
- port: metrics - port: metrics
{{- if .Values.prometheus.monitor.interval }} {{- if or .Values.prometheus.monitor.metrics.interval .Values.prometheus.monitor.interval }}
interval: {{ .Values.prometheus.monitor.interval }} interval: {{ .Values.prometheus.monitor.metrics.interval | default .Values.prometheus.monitor.interval }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.scrapeTimeout }} {{- if or .Values.prometheus.monitor.metrics.scrapeTimeout .Values.prometheus.monitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }} scrapeTimeout: {{ .Values.prometheus.monitor.metrics.scrapeTimeout | default .Values.prometheus.monitor.scrapeTimeout }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.proxyUrl }} {{- if or .Values.prometheus.monitor.metrics.proxyUrl .Values.prometheus.monitor.proxyUrl }}
proxyUrl: {{ .Values.prometheus.monitor.proxyUrl}} proxyUrl: {{ .Values.prometheus.monitor.metrics.proxyUrl | default .Values.prometheus.monitor.proxyUrl }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.enableHttp2 }} {{- if or .Values.prometheus.monitor.metrics.enableHttp2 .Values.prometheus.monitor.enableHttp2 }}
enableHttp2: {{ .Values.prometheus.monitor.enableHttp2}} enableHttp2: {{ .Values.prometheus.monitor.metrics.enableHttp2 | default .Values.prometheus.monitor.enableHttp2 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.honorLabels }} {{- if or .Values.prometheus.monitor.metrics.honorLabels .Values.prometheus.monitor.honorLabels }}
honorLabels: true honorLabels: true
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.metricRelabelings }} {{- if or .Values.prometheus.monitor.metrics.metricRelabelings .Values.prometheus.monitor.metricRelabelings }}
metricRelabelings: metricRelabelings:
{{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }} {{- toYaml (.Values.prometheus.monitor.metrics.metricRelabelings | default .Values.prometheus.monitor.metricRelabelings) | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.relabelings }} {{- if or .Values.prometheus.monitor.metrics.relabelings .Values.prometheus.monitor.relabelings }}
relabelings: relabelings:
{{- toYaml .Values.prometheus.monitor.relabelings | nindent 8 }} {{- toYaml (.Values.prometheus.monitor.metrics.relabelings | default .Values.prometheus.monitor.relabelings) | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.scheme }} {{- if or .Values.prometheus.monitor.metrics.scheme .Values.prometheus.monitor.scheme }}
scheme: {{ .Values.prometheus.monitor.scheme }} scheme: {{ .Values.prometheus.monitor.metrics.scheme | default .Values.prometheus.monitor.scheme }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.tlsConfig }} {{- if or .Values.prometheus.monitor.metrics.tlsConfig .Values.prometheus.monitor.tlsConfig }}
tlsConfig: tlsConfig:
{{- toYaml .Values.prometheus.monitor.tlsConfig | nindent 8 }} {{- toYaml (.Values.prometheus.monitor.metrics.tlsConfig | default .Values.prometheus.monitor.tlsConfig) | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.prometheus.monitor.bearerTokenFile }} {{- if or .Values.prometheus.monitor.metrics.bearerTokenFile .Values.prometheus.monitor.bearerTokenFile }}
bearerTokenFile: {{ .Values.prometheus.monitor.bearerTokenFile }} bearerTokenFile: {{ .Values.prometheus.monitor.metrics.bearerTokenFile | default .Values.prometheus.monitor.bearerTokenFile }}
{{- end }} {{- end }}
{{- with .Values.prometheus.monitor.bearerTokenSecret }} {{- with (.Values.prometheus.monitor.metrics.bearerTokenSecret | default .Values.prometheus.monitor.bearerTokenSecret) }}
bearerTokenSecret: bearerTokenSecret:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}

View File

@ -52,6 +52,9 @@ revisionHistoryLimit: 10
# all the possible args can be found here: https://github.com/kubernetes/kube-state-metrics/blob/master/docs/cli-arguments.md # all the possible args can be found here: https://github.com/kubernetes/kube-state-metrics/blob/master/docs/cli-arguments.md
extraArgs: [] extraArgs: []
# If false then the user will opt out of automounting API credentials.
automountServiceAccountToken: true
service: service:
port: 8080 port: 8080
# Default to clusterIP for backward compatibility # Default to clusterIP for backward compatibility
@ -103,7 +106,7 @@ kubeRBACProxy:
image: image:
registry: quay.io registry: quay.io
repository: brancz/kube-rbac-proxy repository: brancz/kube-rbac-proxy
tag: v0.16.0 tag: v0.18.0
sha: "" sha: ""
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
@ -154,6 +157,8 @@ serviceAccount:
# Use case: AWS EKS IAM roles for service accounts # Use case: AWS EKS IAM roles for service accounts
# ref: https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html # ref: https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html
annotations: {} annotations: {}
# If false then the user will opt out of automounting API credentials.
automountServiceAccountToken: true
prometheus: prometheus:
monitor: monitor:
@ -165,7 +170,6 @@ prometheus:
jobLabel: "" jobLabel: ""
targetLabels: [] targetLabels: []
podTargetLabels: [] podTargetLabels: []
interval: ""
## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
## ##
sampleLimit: 0 sampleLimit: 0
@ -185,24 +189,49 @@ prometheus:
## 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. ## 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.
## ##
labelValueLengthLimit: 0 labelValueLengthLimit: 0
scrapeTimeout: ""
proxyUrl: ""
## Whether to enable HTTP2 for servicemonitor
# enableHttp2: false
selectorOverride: {} selectorOverride: {}
honorLabels: false
metricRelabelings: [] ## kube-state-metrics endpoint
relabelings: [] http:
scheme: "" interval: ""
## File to read bearer token for scraping targets scrapeTimeout: ""
bearerTokenFile: "" proxyUrl: ""
## Secret to mount to read bearer token for scraping targets. The secret needs ## Whether to enable HTTP2 for servicemonitor
## to be in the same namespace as the service monitor and accessible by the enableHttp2: false
## Prometheus Operator honorLabels: false
bearerTokenSecret: {} metricRelabelings: []
# name: secret-name relabelings: []
# key: key-name scheme: ""
tlsConfig: {} ## File to read bearer token for scraping targets
bearerTokenFile: ""
## Secret to mount to read bearer token for scraping targets. The secret needs
## to be in the same namespace as the service monitor and accessible by the
## Prometheus Operator
bearerTokenSecret: {}
# name: secret-name
# key: key-name
tlsConfig: {}
## selfMonitor endpoint
metrics:
interval: ""
scrapeTimeout: ""
proxyUrl: ""
## Whether to enable HTTP2 for servicemonitor
enableHttp2: false
honorLabels: false
metricRelabelings: []
relabelings: []
scheme: ""
## File to read bearer token for scraping targets
bearerTokenFile: ""
## Secret to mount to read bearer token for scraping targets. The secret needs
## to be in the same namespace as the service monitor and accessible by the
## Prometheus Operator
bearerTokenSecret: {}
# name: secret-name
# key: key-name
tlsConfig: {}
## Specify if a Pod Security Policy for kube-state-metrics must be created ## Specify if a Pod Security Policy for kube-state-metrics must be created
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/

View File

@ -4,7 +4,7 @@ annotations:
- name: Chart Source - name: Chart Source
url: https://github.com/prometheus-community/helm-charts url: https://github.com/prometheus-community/helm-charts
apiVersion: v2 apiVersion: v2
appVersion: 1.8.0 appVersion: 1.8.1
description: A Helm chart for prometheus node-exporter description: A Helm chart for prometheus node-exporter
home: https://github.com/prometheus/node_exporter/ home: https://github.com/prometheus/node_exporter/
keywords: keywords:
@ -22,4 +22,4 @@ name: prometheus-node-exporter
sources: sources:
- https://github.com/prometheus/node_exporter/ - https://github.com/prometheus/node_exporter/
type: application type: application
version: 4.34.0 version: 4.37.0

View File

@ -19,6 +19,9 @@ spec:
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }} {{- end }}
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
{{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }}
clusterIP: "{{ .Values.service.clusterIP }}"
{{- end }}
ports: ports:
- port: {{ .Values.service.port }} - port: {{ .Values.service.port }}
{{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }} {{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }}

View File

@ -10,6 +10,7 @@ metadata:
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- if or .Values.serviceAccount.imagePullSecrets .Values.global.imagePullSecrets }} {{- if or .Values.serviceAccount.imagePullSecrets .Values.global.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
{{- include "prometheus-node-exporter.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.serviceAccount.imagePullSecrets) | indent 2 }} {{- include "prometheus-node-exporter.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.serviceAccount.imagePullSecrets) | indent 2 }}

View File

@ -45,7 +45,7 @@ kubeRBACProxy:
image: image:
registry: quay.io registry: quay.io
repository: brancz/kube-rbac-proxy repository: brancz/kube-rbac-proxy
tag: v0.16.0 tag: v0.18.0
sha: "" sha: ""
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
@ -87,6 +87,7 @@ kubeRBACProxy:
service: service:
enabled: true enabled: true
type: ClusterIP type: ClusterIP
clusterIP: ""
port: 9100 port: 9100
targetPort: 9100 targetPort: 9100
nodePort: nodePort:

View File

@ -47,6 +47,10 @@ spec:
logFormat: {{ .Values.alertmanager.alertmanagerSpec.logFormat | quote }} logFormat: {{ .Values.alertmanager.alertmanagerSpec.logFormat | quote }}
logLevel: {{ .Values.alertmanager.alertmanagerSpec.logLevel | quote }} logLevel: {{ .Values.alertmanager.alertmanagerSpec.logLevel | quote }}
retention: {{ .Values.alertmanager.alertmanagerSpec.retention | quote }} retention: {{ .Values.alertmanager.alertmanagerSpec.retention | quote }}
{{- with .Values.alertmanager.enableFeatures }}
enableFeatures:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.alertmanager.alertmanagerSpec.secrets }} {{- if .Values.alertmanager.alertmanagerSpec.secrets }}
secrets: secrets:
{{ toYaml .Values.alertmanager.alertmanagerSpec.secrets | indent 4 }} {{ toYaml .Values.alertmanager.alertmanagerSpec.secrets | indent 4 }}

View File

@ -22,7 +22,7 @@ data:
datasources: datasources:
{{- $scrapeInterval := .Values.grafana.sidecar.datasources.defaultDatasourceScrapeInterval | default .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }} {{- $scrapeInterval := .Values.grafana.sidecar.datasources.defaultDatasourceScrapeInterval | default .Values.prometheus.prometheusSpec.scrapeInterval | default "30s" }}
{{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }} {{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }}
- name: {{ .Values.grafana.sidecar.datasources.name }} - name: "{{ .Values.grafana.sidecar.datasources.name }}"
type: prometheus type: prometheus
uid: {{ .Values.grafana.sidecar.datasources.uid }} uid: {{ .Values.grafana.sidecar.datasources.uid }}
{{- if .Values.grafana.sidecar.datasources.url }} {{- if .Values.grafana.sidecar.datasources.url }}
@ -45,7 +45,7 @@ data:
{{- end }} {{- end }}
{{- if .Values.grafana.sidecar.datasources.createPrometheusReplicasDatasources }} {{- if .Values.grafana.sidecar.datasources.createPrometheusReplicasDatasources }}
{{- range until (int .Values.prometheus.prometheusSpec.replicas) }} {{- range until (int .Values.prometheus.prometheusSpec.replicas) }}
- name: {{ .Values.grafana.sidecar.datasources.name }}-{{ . }} - name: "{{ $.Values.grafana.sidecar.datasources.name }}-{{ . }}"
type: prometheus type: prometheus
uid: {{ $.Values.grafana.sidecar.datasources.uid }}-replica-{{ . }} uid: {{ $.Values.grafana.sidecar.datasources.uid }}-replica-{{ . }}
url: http://prometheus-{{ template "kube-prometheus-stack.prometheus.crname" $ }}-{{ . }}.prometheus-operated:9090/{{ trimPrefix "/" $.Values.prometheus.prometheusSpec.routePrefix }} url: http://prometheus-{{ template "kube-prometheus-stack.prometheus.crname" $ }}-{{ . }}.prometheus-operated:9090/{{ trimPrefix "/" $.Values.prometheus.prometheusSpec.routePrefix }}
@ -61,7 +61,7 @@ data:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.grafana.sidecar.datasources.alertmanager.enabled }} {{- if .Values.grafana.sidecar.datasources.alertmanager.enabled }}
- name: {{ .Values.grafana.sidecar.datasources.alertmanager.name }} - name: "{{ .Values.grafana.sidecar.datasources.alertmanager.name }}"
type: alertmanager type: alertmanager
uid: {{ .Values.grafana.sidecar.datasources.alertmanager.uid }} uid: {{ .Values.grafana.sidecar.datasources.alertmanager.uid }}
{{- if .Values.grafana.sidecar.datasources.alertmanager.url }} {{- if .Values.grafana.sidecar.datasources.alertmanager.url }}

View File

@ -31,6 +31,12 @@ rules:
- services/{{ include "prometheus-node-exporter.fullname" (index .Subcharts "prometheus-node-exporter") }} - services/{{ include "prometheus-node-exporter.fullname" (index .Subcharts "prometheus-node-exporter") }}
verbs: [ "get", "list", "watch" ] verbs: [ "get", "list", "watch" ]
{{- end }} {{- end }}
{{- if and .Values.kubeStateMetrics.enabled (index .Values "kube-state-metrics").kubeRBACProxy.enabled }}
- apiGroups: [ "" ]
resources:
- services/{{ include "kube-state-metrics.fullname" (index .Subcharts "kube-state-metrics") }}
verbs: [ "get", "list", "watch" ]
{{- end }}
{{- if .Values.prometheus.additionalRulesForClusterRole }} {{- if .Values.prometheus.additionalRulesForClusterRole }}
{{ toYaml .Values.prometheus.additionalRulesForClusterRole | indent 0 }} {{ toYaml .Values.prometheus.additionalRulesForClusterRole | indent 0 }}
{{- end }} {{- end }}

View File

@ -17,6 +17,7 @@ metadata:
{{ toYaml .Values.prometheus.annotations | indent 4 }} {{ toYaml .Values.prometheus.annotations | indent 4 }}
{{- end }} {{- end }}
spec: spec:
automountServiceAccountToken: {{ .Values.prometheus.prometheusSpec.automountServiceAccountToken }}
{{- if and (not .Values.prometheus.agentMode) (or .Values.prometheus.prometheusSpec.alertingEndpoints .Values.alertmanager.enabled) }} {{- if and (not .Values.prometheus.agentMode) (or .Values.prometheus.prometheusSpec.alertingEndpoints .Values.alertmanager.enabled) }}
alerting: alerting:
alertmanagers: alertmanagers:
@ -111,6 +112,10 @@ spec:
- {{ tpl $enableFeatures $ }} - {{ tpl $enableFeatures $ }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with .Values.prometheus.prometheusSpec.scrapeClasses }}
scrapeClasses:
{{- tpl (toYaml . | nindent 4) $ }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.scrapeInterval }} {{- if .Values.prometheus.prometheusSpec.scrapeInterval }}
scrapeInterval: {{ .Values.prometheus.prometheusSpec.scrapeInterval }} scrapeInterval: {{ .Values.prometheus.prometheusSpec.scrapeInterval }}
{{- end }} {{- end }}
@ -261,6 +266,10 @@ spec:
storage: storage:
{{ tpl (toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4) . }} {{ tpl (toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4) . }}
{{- end }} {{- end }}
{{- with .Values.prometheus.prometheusSpec.persistentVolumeClaimRetentionPolicy }}
persistentVolumeClaimRetentionPolicy:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.podMetadata }} {{- if .Values.prometheus.prometheusSpec.podMetadata }}
podMetadata: podMetadata:
{{ tpl (toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4) . }} {{ tpl (toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4) . }}

View File

@ -275,6 +275,10 @@ alertmanager:
## ##
apiVersion: v2 apiVersion: v2
## @param alertmanager.enableFeatures Enable access to Alertmanager disabled features.
##
enableFeatures: []
## Service account for Alertmanager to use. ## Service account for Alertmanager to use.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
## ##
@ -1126,6 +1130,8 @@ grafana:
## ##
service: service:
portName: http-web portName: http-web
ipFamilies: []
ipFamilyPolicy: ""
serviceMonitor: serviceMonitor:
# If true, a ServiceMonitor CRD is created for a prometheus operator # If true, a ServiceMonitor CRD is created for a prometheus operator
@ -2862,7 +2868,7 @@ prometheusOperator:
thanosImage: thanosImage:
registry: quay.io registry: quay.io
repository: thanos/thanos repository: thanos/thanos
tag: v0.35.0 tag: v0.35.1
sha: "" sha: ""
## Set a Label Selector to filter watched prometheus and prometheusAgent ## Set a Label Selector to filter watched prometheus and prometheusAgent
@ -3365,8 +3371,23 @@ prometheus:
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#prometheusspec ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#prometheusspec
## ##
prometheusSpec: prometheusSpec:
## Statefulset's persistent volume claim retention policy
## pvcDeleteOnStsDelete and pvcDeleteOnStsScale determine whether
## statefulset's PVCs are deleted (true) or retained (false) on scaling down
## and deleting statefulset, respectively. Requires 1.27.0+.
## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
persistentVolumeClaimRetentionPolicy: {}
# whenDeleted: Retain
# whenScaled: Retain
## If true, pass --storage.tsdb.max-block-duration=2h to prometheus. This is already done if using Thanos ## If true, pass --storage.tsdb.max-block-duration=2h to prometheus. This is already done if using Thanos
## ##
## AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in the pod,
## If the field isnt set, the operator mounts the service account token by default.
## Warning: be aware that by default, Prometheus requires the service account token for Kubernetes service discovery,
## It is possible to use strategic merge patch to project the service account token into the prometheus container.
automountServiceAccountToken: true
disableCompaction: false disableCompaction: false
## APIServerConfig ## APIServerConfig
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#apiserverconfig ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#apiserverconfig
@ -3387,6 +3408,16 @@ prometheus:
## ##
scrapeTimeout: "" scrapeTimeout: ""
## List of scrape classes to expose to scraping objects such as
## PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.
##
scrapeClasses: []
# - name: istio-mtls
# default: false
# tlsConfig:
# caFile: /etc/prometheus/secrets/istio.default/root-cert.pem
# certFile: /etc/prometheus/secrets/istio.default/cert-chain.pem
## Interval between consecutive evaluations. ## Interval between consecutive evaluations.
## ##
evaluationInterval: "" evaluationInterval: ""
@ -3427,7 +3458,7 @@ prometheus:
image: image:
registry: quay.io registry: quay.io
repository: prometheus/prometheus repository: prometheus/prometheus
tag: v2.52.0 tag: v2.53.1
sha: "" sha: ""
## Tolerations for use with node taints ## Tolerations for use with node taints
@ -4065,7 +4096,7 @@ prometheus:
## Defines the maximum time that the `prometheus` container's startup probe ## Defines the maximum time that the `prometheus` container's startup probe
## will wait before being considered failed. The startup probe will return ## will wait before being considered failed. The startup probe will return
## success after the WAL replay is complete. If set, the value should be ## success after the WAL replay is complete. If set, the value should be
## greater than 60 (seconds). Otherwise it will be equal to 600 seconds (15 ## greater than 60 (seconds). Otherwise it will be equal to 900 seconds (15
## minutes). ## minutes).
maximumStartupDurationSeconds: 0 maximumStartupDurationSeconds: 0
@ -4415,7 +4446,7 @@ thanosRuler:
image: image:
registry: quay.io registry: quay.io
repository: thanos/thanos repository: thanos/thanos
tag: v0.35.0 tag: v0.35.1
sha: "" sha: ""
## Namespaces to be selected for PrometheusRules discovery. ## Namespaces to be selected for PrometheusRules discovery.

View File

@ -88,8 +88,8 @@
"subdir": "grafana-builder" "subdir": "grafana-builder"
} }
}, },
"version": "1d877bb0651ef92176f651d0be473c06e372a8a0", "version": "02db06f540086fa3f67d487bd01e1b314853fb8f",
"sum": "udZaafkbKYMGodLqsFhEe+Oy/St2p0edrK7hiMPEey0=" "sum": "B49EzIY2WZsFxNMJcgRxE/gcZ9ltnS8pkOOV6Q5qioc="
}, },
{ {
"source": { "source": {
@ -128,7 +128,7 @@
"subdir": "jsonnet/kube-state-metrics" "subdir": "jsonnet/kube-state-metrics"
} }
}, },
"version": "7104d579e93d672754c018a924d6c3f7ec23874e", "version": "38c268909335d243fc260ed4d6ce713db3265464",
"sum": "pvInhJNQVDOcC3NGWRMKRIP954mAvLXCQpTlafIg7fA=" "sum": "pvInhJNQVDOcC3NGWRMKRIP954mAvLXCQpTlafIg7fA="
}, },
{ {
@ -138,7 +138,7 @@
"subdir": "jsonnet/kube-state-metrics-mixin" "subdir": "jsonnet/kube-state-metrics-mixin"
} }
}, },
"version": "7104d579e93d672754c018a924d6c3f7ec23874e", "version": "38c268909335d243fc260ed4d6ce713db3265464",
"sum": "qclI7LwucTjBef3PkGBkKxF0mfZPbHnn4rlNWKGtR4c=" "sum": "qclI7LwucTjBef3PkGBkKxF0mfZPbHnn4rlNWKGtR4c="
}, },
{ {

View File

@ -95,7 +95,7 @@ operators:
metrics: metrics:
enabled: false enabled: false
namespace: monitoring namespace: monitoring
targetRevision: 0.9.8 targetRevision: 0.10.0
istio: istio:
grafana: {} grafana: {}
prometheus: {} prometheus: {}