×

Specification

Property Type Description

apiVersion

string

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

kind

string

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

metadata

ObjectMeta_v2

Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object

Specification of desired Ingress selection for target discovery by Prometheus.

.spec

Description

Specification of desired Ingress selection for target discovery by Prometheus.

Type

object

Property Type Description

authorization

object

Authorization section for this endpoint

basicAuth

object

BasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint

bearerTokenSecret

object

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.

interval

string

Interval at which targets are probed using the configured prober. If not specified Prometheus' global scrape interval is used.

jobName

string

The job name assigned to scraped metrics by default.

labelLimit

integer

Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.

labelNameLengthLimit

integer

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.

labelValueLengthLimit

integer

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.

metricRelabelings

array

MetricRelabelConfigs to apply to samples before ingestion.

metricRelabelings[]

object

RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines <metric_relabel_configs>-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs

module

string

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

oauth2

object

OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.

prober

object

Specification for the prober to use for probing targets. The prober.URL parameter is required. Targets cannot be probed if left empty.

sampleLimit

integer

SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.

scrapeTimeout

string

Timeout for scraping metrics from the Prometheus exporter. If not specified, the Prometheus global scrape interval is used.

targetLimit

integer

TargetLimit defines a limit on the number of scraped targets that will be accepted.

targets

object

Targets defines a set of static or dynamically discovered targets to probe.

tlsConfig

object

TLS configuration to use when scraping the endpoint.

.spec.authorization

Description

Authorization section for this endpoint

Type

object

Property Type Description

credentials

object

The secret’s key that contains the credentials of the request

type

string

Set the authentication type. Defaults to Bearer, Basic will cause an error

.spec.authorization.credentials

Description

The secret’s key that contains the credentials of the request

Type

object

Required
  • key

Property Type Description

key

string

The key of the secret to select from. Must be a valid secret key.

name

string

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?

optional

boolean

Specify whether the Secret or its key must be defined

.spec.basicAuth

Description

BasicAuth allow an endpoint to authenticate over basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint

Type

object

Property Type Description

password

object

The secret in the service monitor namespace that contains the password for authentication.

username

object

The secret in the service monitor namespace that contains the username for authentication.

.spec.basicAuth.password

Description

The secret in the service monitor namespace that contains the password for authentication.

Type

object

Required
  • key

Property Type Description

key

string

The key of the secret to select from. Must be a valid secret key.

name

string

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?

optional

boolean

Specify whether the Secret or its key must be defined

.spec.basicAuth.username

Description

The secret in the service monitor namespace that contains the username for authentication.

Type

object

Required
  • key

Property Type Description

key

string

The key of the secret to select from. Must be a valid secret key.

name

string

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?

optional

boolean

Specify whether the Secret or its key must be defined

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

Type

object

Required
  • key

Property Type Description

key

string

The key of the secret to select from. Must be a valid secret key.

name

string

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?

optional

boolean

Specify whether the Secret or its key must be defined

.spec.metricRelabelings

Description

MetricRelabelConfigs to apply to samples before ingestion.

Type

array

.spec.metricRelabelings[]

Description

RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines <metric_relabel_configs>-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs

Type

object

Property Type Description

action

string

Action to perform based on regex matching. Default is 'replace'

modulus

integer

Modulus to take of the hash of the source label values.

regex

string

Regular expression against which the extracted value is matched. Default is '(.*)'

replacement

string

Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'

separator

string

Separator placed between concatenated source label values. default is ';'.

sourceLabels

array (string)

The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.

targetLabel

string

Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.

.spec.oauth2

Description

OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.

Type

object

Required
  • clientId

  • clientSecret

  • tokenUrl

Property Type Description

clientId

object

The secret or configmap containing the OAuth2 client id

clientSecret

object

The secret containing the OAuth2 client secret

endpointParams

object (string)

Parameters to append to the token URL

scopes

array (string)

OAuth2 scopes used for the token request

tokenUrl

string

The URL to fetch the token from

.spec.oauth2.clientId

Description

The secret or configmap containing the OAuth2 client id

Type

object

Property Type Description

configMap

object

ConfigMap containing data to use for the targets.

secret

object

Secret containing data to use for the targets.

.spec.oauth2.clientId.configMap

Description

ConfigMap containing data to use for the targets.

Type

object

Required
  • key

Property Type Description

key

string

The key to select.

name

string

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?

optional

boolean

Specify whether the ConfigMap or its key must be defined

.spec.oauth2.clientId.secret

Description

Secret containing data to use for the targets.

Type

object

Required
  • key

Property Type Description

key

string

The key of the secret to select from. Must be a valid secret key.

name

string

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?

optional

boolean

Specify whether the Secret or its key must be defined

.spec.oauth2.clientSecret

Description

The secret containing the OAuth2 client secret

Type

object

Required
  • key

Property Type Description

key

string

The key of the secret to select from. Must be a valid secret key.

name

string

Name of the referent. More info: https://kubernetes.io/docs/concep