prometheus operator v0.93.1

PodMonitor.spec.podMetricsEndpoints.oauth2.tlsConfig.cert.spec.podMetricsEndpoints

podMetricsEndpoints defines how to scrape metrics from the selected pods.

25 fields
PodMonitor.spec.podMetricsEndpoints.oauth2.tlsConfig.cert.spec.podMetricsEndpoints fields and descriptions
Field / TypeDescription
object

authorization configures the Authorization header credentials used by the client. Cannot be set at the same time as `basicAuth`, `bearerTokenSecret` or `oauth2`.

object

basicAuth defines the Basic Authentication credentials used by the client. Cannot be set at the same time as `authorization`, `bearerTokenSecret` or `oauth2`.

object

bearerTokenSecret defines a key of a Secret containing the bearer token used by the client for authentication. The secret needs to be in the same namespace as the custom resource and readable by the Prometheus Operator. Cannot be set at the same time as `authorization`, `basicAuth` or `oauth2`. Deprecated: use `authorization` instead.

  • x-kubernetes-map-type: "atomic"
enableHttp2
boolean

enableHttp2 can be used to disable HTTP2.

filterRunning
boolean

filterRunning 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

followRedirects
boolean

followRedirects defines whether the client should follow HTTP 3xx redirects.

honorLabels
boolean

honorLabels when true preserves the metric's labels when they collide with the target's labels.

honorTimestamps
boolean

honorTimestamps defines whether Prometheus preserves the timestamps when exposed by the target.

interval
string

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)?)$
object[]

metricRelabelings defines the relabeling rules to apply to the samples before ingestion.

noProxy
string

noProxy defines a comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying. IP and domain names can contain port numbers. It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

object

oauth2 defines the OAuth2 settings used by the client. It requires Prometheus >= 2.27.0. Cannot be set at the same time as `authorization`, `basicAuth` or `bearerTokenSecret`.

map[string]string[]

params define optional HTTP URL parameters.

path
string

path defines the HTTP path from which to scrape for metrics. If empty, Prometheus uses the default value (e.g. `/metrics`).

port
string

port defines the `Pod` port name which exposes the endpoint. If the pod doesn't expose a port with the same name, it will result in no targets being discovered. If a `Pod` has multiple `Port`s with the same name (which is not recommended), one target instance per unique port number will be generated. It takes precedence over the `portNumber` and `targetPort` fields.

portNumber
integer

portNumber defines the `Pod` port number which exposes the endpoint. The `Pod` must declare the specified `Port` in its spec or the target will be dropped by Prometheus. This cannot be used to enable scraping of an undeclared port. To scrape targets on a port which isn't exposed, you need to use relabeling to override the `__address__` label (but beware of duplicate targets if the `Pod` has other declared ports). In practice Prometheus will select targets for which the matches the target's __meta_kubernetes_pod_container_port_number.

  • format: int32
  • minimum: 1
  • maximum: 65535
map[string]object[]

proxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests. It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

  • x-kubernetes-map-type: "atomic"
proxyFromEnvironment
boolean

proxyFromEnvironment defines whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY). It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

proxyUrl
string

proxyUrl defines the HTTP proxy server to use.

  • pattern: ^(http|https|socks5)://.+$
object[]

relabelings defines 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

scheme
string

scheme defines the HTTP scheme to use for scraping.

  • enum: ["http","https","HTTP","HTTPS"]
scrapeTimeout
string

scrapeTimeout defines the 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. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
integer | string

targetPort defines the 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' or 'portNumber' instead.

  • x-kubernetes-int-or-string: true
object

tlsConfig defines the TLS configuration used by the client.

trackTimestampsStaleness
boolean

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.