[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
3419 lines (3419 loc) · 67.3 KB

api.md

File metadata and controls

3419 lines (3419 loc) · 67.3 KB

Packages:

monitoring.googleapis.com/v1

Package v1 is the v1 version of the API.

Resource Types:

AlertingSpec

(Appears in: RuleEvaluatorSpec)

AlertingSpec defines alerting configuration.

Field Description
alertmanagers
[]AlertmanagerEndpoints

Alertmanagers contains endpoint configuration for designated Alertmanagers.

AlertmanagerEndpoints

(Appears in: AlertingSpec)

AlertmanagerEndpoints defines a selection of a single Endpoints object containing alertmanager IPs to fire alerts against.

Field Description
namespace
string

Namespace of Endpoints object.

name
string

Name of Endpoints object in Namespace.

port
k8s.io/apimachinery/pkg/util/intstr.IntOrString

Port the Alertmanager API is exposed on.

scheme
string

Scheme to use when firing alerts.

pathPrefix
string

Prefix for the HTTP path alerts are pushed to.

tls
TLSConfig

TLS Config to use for alertmanager connection.

authorization
Authorization

Authorization section for this alertmanager endpoint

apiVersion
string

Version of the Alertmanager API that rule-evaluator uses to send alerts. It can be “v1” or “v2”.

timeout
string

Timeout is a per-target Alertmanager timeout when pushing alerts.

Auth

(Appears in: HTTPClientConfig)

Auth sets the Authorization header on every HTTP request.

Field Description
type
string
(Optional)

Type is the authentication type. Defaults to Bearer. Basic will cause an error, as the BasicAuth object should be used instead.

credentials
SecretSelector
(Optional)

Credentials uses the secret as the credentials (token) for the authentication header.

Authorization

(Appears in: AlertmanagerEndpoints)

Authorization specifies a subset of the Authorization struct, that is safe for use in Endpoints (no CredentialsFile field).

Field Description
type
string

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

credentials
Kubernetes core/v1.SecretKeySelector

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

BasicAuth

(Appears in: HTTPClientConfig)

BasicAuth sets the Authorization header on every HTTP request with the configured username and password.

Field Description
username
string
(Optional)

Username is the BasicAuth username.

password
SecretSelector
(Optional)

Password uses the secret as the BasicAuth password.

ClusterNodeMonitoring

ClusterNodeMonitoring defines monitoring for a set of nodes.

Field Description
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
ClusterNodeMonitoringSpec

Specification of desired node selection for target discovery by Prometheus.

status
MonitoringStatus
(Optional)

Most recently observed status of the resource.

ClusterNodeMonitoringSpec

(Appears in: ClusterNodeMonitoring)

ClusterNodeMonitoringSpec contains specification parameters for ClusterNodeMonitoring.

Field Description
selector
Kubernetes meta/v1.LabelSelector

Label selector that specifies which nodes are selected for this monitoring configuration. If left empty all nodes are selected.

endpoints
[]ScrapeNodeEndpoint

The endpoints to scrape on the selected nodes.

limits
ScrapeLimits

Limits to apply at scrape time.

ClusterPodMonitoring

ClusterPodMonitoring defines monitoring for a set of pods, scoped to all pods within the cluster.

Field Description
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
ClusterPodMonitoringSpec

Specification of desired Pod selection for target discovery by Prometheus.

status
PodMonitoringStatus
(Optional)

Most recently observed status of the resource.

ClusterPodMonitoringSpec

(Appears in: ClusterPodMonitoring)

ClusterPodMonitoringSpec contains specification parameters for ClusterPodMonitoring.

Field Description
selector
Kubernetes meta/v1.LabelSelector

Label selector that specifies which pods are selected for this monitoring configuration.

endpoints
[]ScrapeEndpoint

The endpoints to scrape on the selected pods.

targetLabels
TargetLabels

Labels to add to the Prometheus target for discovered endpoints. The instance label is always set to <pod_name>:<port> or <node_name>:<port> if the scraped pod is controlled by a DaemonSet.

limits
ScrapeLimits

Limits to apply at scrape time.

filterRunning
bool

FilterRunning will drop any pods that are in the “Failed” or “Succeeded” pod lifecycle. See: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase Specifically, this prevents scraping Succeeded pods from K8s jobs, which could contribute to noisy logs or irrelevant metrics. Additionally, it can mitigate issues with reusing stale target labels in cases where Pod IPs are reused (e.g. spot containers). See: #145

ClusterRules

ClusterRules defines Prometheus alerting and recording rules that are scoped to the current cluster. Only metric data from the current cluster is processed and all rule results have their project_id and cluster label preserved for query processing. If the location label is not preserved by the rule, it defaults to the cluster’s location.

Field Description
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
RulesSpec

Specification of rules to record and alert on.

status
RulesStatus
(Optional)

Most recently observed status of the resource.

CollectionSpec

(Appears in: OperatorConfig)

CollectionSpec specifies how the operator configures collection of metric data.

Field Description
externalLabels
map[string]string

ExternalLabels specifies external labels that are attached to all scraped data before being written to Google Cloud Monitoring or any other additional exports specified in the OperatorConfig. The precedence behavior matches that of Prometheus.

filter
ExportFilters

Filter limits which metric data is sent to Cloud Monitoring (it doesn’t apply to additional exports).

credentials
Kubernetes core/v1.SecretKeySelector

A reference to GCP service account credentials with which Prometheus collectors are run. It needs to have metric write permissions for all project IDs to which data is written. Within GKE, this can typically be left empty if the compute default service account has the required permissions.

kubeletScraping
KubeletScraping

Configuration to scrape the metric endpoints of the Kubelets.

compression
CompressionType

Compression enables compression of metrics collection data

CompressionType (string alias)

(Appears in: CollectionSpec, ConfigSpec)

Value Description

"gzip"

"none"

ConfigSpec

(Appears in: OperatorFeatures)

ConfigSpec holds configurations for the Prometheus configuration.

Field Description
compression
CompressionType

Compression enables compression of the config data propagated by the operator to collectors and the rule-evaluator. It is recommended to use the gzip option when using a large number of ClusterPodMonitoring, PodMonitoring, GlobalRules, ClusterRules, and/or Rules.

ExportFilters

(Appears in: CollectionSpec)

ExportFilters provides mechanisms to filter the scraped data that’s sent to GMP.

Field Description
matchOneOf
[]string

A list of Prometheus time series matchers. Every time series must match at least one of the matchers to be exported. This field can be used equivalently to the match[] parameter of the Prometheus federation endpoint to selectively export data. Example: ["{job!='foobar'}", "{__name__!~'container_foo.*|container_bar.*'}"]

ExportSpec

(Appears in: OperatorConfig)

Field Description
url
string

The URL of the endpoint that supports Prometheus Remote Write to export samples to.

GlobalRules

GlobalRules defines Prometheus alerting and recording rules that are scoped to all data in the queried project. If the project_id or location labels are not preserved by the rule, they default to the values of the cluster.

Field Description
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
RulesSpec

Specification of rules to record and alert on.

status
RulesStatus
(Optional)

Most recently observed status of the resource.

HTTPClientConfig

(Appears in: ScrapeEndpoint)

HTTPClientConfig stores HTTP-client configurations.

Field Description
authorization
Auth
(Optional)

Authorization is the HTTP authorization credentials for the targets.

basicAuth
BasicAuth
(Optional)

BasicAuth is the HTTP basic authentication credentials for the targets.

tls
TLS
(Optional)

TLS configures the scrape request’s TLS settings.

oauth2
OAuth2
(Optional)

OAuth2 is the OAuth2 client credentials used to fetch a token for the targets.

ProxyConfig
ProxyConfig

(Members of ProxyConfig are embedded into this type.)

KubeletScraping

(Appears in: CollectionSpec)

KubeletScraping allows enabling scraping of the Kubelets’ metric endpoints.

Field Description
interval
string

The interval at which the metric endpoints are scraped.

tlsInsecureSkipVerify
bool

TLSInsecureSkipVerify disables verifying the target cert. This can be useful for clusters provisioned with kubeadm.

LabelMapping

(Appears in: TargetLabels)

LabelMapping specifies how to transfer a label from a Kubernetes resource onto a Prometheus target.

Field Description
from
string

Kubernetes resource label to remap.

to
string

Remapped Prometheus target label. Defaults to the same name as From.

ManagedAlertmanagerSpec

(Appears in: OperatorConfig)

ManagedAlertmanagerSpec holds configuration information for the managed Alertmanager instance.

Field Description
configSecret
Kubernetes core/v1.SecretKeySelector

ConfigSecret refers to the name of a single-key Secret in the public namespace that holds the managed Alertmanager config file.

externalURL
string

ExternalURL is the URL under which Alertmanager is externally reachable (for example, if Alertmanager is served via a reverse proxy). Used for generating relative and absolute links back to Alertmanager itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by Alertmanager. If omitted, relevant URL components will be derived automatically.

MonitoringCRD

MonitoringCondition

(Appears in: MonitoringStatus)

MonitoringCondition describes the condition of a PodMonitoring.

Field Description
type
MonitoringConditionType
status
Kubernetes core/v1.ConditionStatus

Status of the condition, one of True, False, Unknown.

lastUpdateTime
Kubernetes meta/v1.Time
(Optional)

The last time this condition was updated.

lastTransitionTime
Kubernetes meta/v1.Time
(Optional)

Last time the condition transitioned from one status to another.

reason
string
(Optional)

The reason for the condition’s last transition.

message
string
(Optional)

A human-readable message indicating details about the transition.

MonitoringConditionType (string alias)

(Appears in: MonitoringCondition)

MonitoringConditionType is the type of MonitoringCondition.

Value Description

"ConfigurationCreateSuccess"

ConfigurationCreateSuccess indicates that the config generated from the monitoring resource was created successfully.

MonitoringStatus

(Appears in: ClusterNodeMonitoring, PodMonitoringStatus)

MonitoringStatus holds status information of a monitoring resource.

Field Description
observedGeneration
int64
(Optional)

The generation observed by the controller.

conditions
[]MonitoringCondition

Represents the latest available observations of a podmonitor’s current state.

OAuth2

(Appears in: HTTPClientConfig)

OAuth2 is the OAuth2 client configuration.

Field Description
clientID
string
(Optional)

ClientID is the public identifier for the client.

clientSecret
SecretSelector
(Optional)

ClientSecret uses the secret as the client secret token.

scopes
[]string
(Optional)

Scopes represents the scopes for the token request.

tokenURL
string
(Optional)

TokenURL is the URL to fetch the token from.

endpointParams
map[string]string
(Optional)

EndpointParams are additional parameters to append to the token URL.

tlsConfig
TLS
(Optional)

TLS configures the token request’s TLS settings.

ProxyConfig
ProxyConfig

(Members of ProxyConfig are embedded into this type.)

OperatorConfig

OperatorConfig defines configuration of the gmp-operator.

Field Description
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
rules
RuleEvaluatorSpec

Rules specifies how the operator configures and deploys rule-evaluator.

collection
CollectionSpec

Collection specifies how the operator configures collection, including scraping and an integrated export to Google Cloud Monitoring.

exports
[]ExportSpec

Exports is an EXPERIMENTAL feature that specifies additional, optional endpoints to export to, on top of Google Cloud Monitoring collection. Note: To disable integrated export to Google Cloud Monitoring specify a non-matching filter in the “collection.filter” field.

managedAlertmanager
ManagedAlertmanagerSpec

ManagedAlertmanager holds information for configuring the managed instance of Alertmanager.

features
OperatorFeatures

Features holds configuration for optional managed-collection features.

scaling
ScalingSpec

Scaling contains configuration options for scaling GMP.

OperatorConfigValidator

Field Description
Namespace
string
Name
string
VPAAvailable
bool

OperatorFeatures

(Appears in: OperatorConfig)

OperatorFeatures holds configuration for optional managed-collection features.

Field Description
targetStatus
TargetStatusSpec

Configuration of target status reporting.

config
ConfigSpec

Settings for the collector configuration propagation.

PodMonitoring

PodMonitoring defines monitoring for a set of pods, scoped to pods within the PodMonitoring’s namespace.

Field Description
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
PodMonitoringSpec

Specification of desired Pod selection for target discovery by Prometheus.

status
PodMonitoringStatus
(Optional)

Most recently observed status of the resource.

PodMonitoringCRD

PodMonitoringCRD represents a Kubernetes CRD that monitors Pod endpoints.

PodMonitoringSpec

(Appears in: PodMonitoring)

PodMonitoringSpec contains specification parameters for PodMonitoring.

Field Description
selector
Kubernetes meta/v1.LabelSelector

Label selector that specifies which pods are selected for this monitoring configuration.

endpoints
[]ScrapeEndpoint

The endpoints to scrape on the selected pods.

targetLabels
TargetLabels

Labels to add to the Prometheus target for discovered endpoints. The instance label is always set to <pod_name>:<port> or <node_name>:<port> if the scraped pod is controlled by a DaemonSet.

limits
ScrapeLimits

Limits to apply at scrape time.

filterRunning
bool

FilterRunning will drop any pods that are in the “Failed” or “Succeeded” pod lifecycle. See: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase

PodMonitoringStatus

(Appears in: ClusterPodMonitoring, PodMonitoring)

PodMonitoringStatus holds status information of a PodMonitoring resource.

Field Description
MonitoringStatus
MonitoringStatus

(Members of MonitoringStatus are embedded into this type.)

endpointStatuses
[]ScrapeEndpointStatus

Represents the latest available observations of target state for each ScrapeEndpoint.

PrometheusSecretConfigs (map[string]github.com/GoogleCloudPlatform/prometheus-engine/pkg/secrets.KubernetesSecretConfig alias)

PrometheusSecretConfigs allows quick gathering of SecretConfigs for Prometheus configuration.

ProxyConfig

(Appears in: HTTPClientConfig, OAuth2)

ProxyConfig specifies the proxy HTTP configuration.

Field Description
proxyUrl
string
(Optional)

ProxyURL is the HTTP proxy server to use to connect to the targets.

Encoded passwords are not supported.

RelabelingRule

(Appears in: ScrapeEndpoint, ScrapeNodeEndpoint)

RelabelingRule defines a single Prometheus relabeling rule.

Field Description
sourceLabels
[]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.

separator
string

Separator placed between concatenated source label values. Defaults to ‘;’.

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.

regex
string

Regular expression against which the extracted value is matched. Defaults to ‘(.*)’.

modulus
uint64

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

replacement
string

Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Defaults to ‘$1’.

action
string

Action to perform based on regex matching. Defaults to ‘replace’.

Rule

(Appears in: RuleGroup)

Rule is a single rule in the Prometheus format: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/

Field Description
record
string

Record the result of the expression to this metric name. Only one of record and alert must be set.

alert
string

Name of the alert to evaluate the expression as. Only one of record and alert must be set.

expr
string

The PromQL expression to evaluate.

for
string

The duration to wait before a firing alert produced by this rule is sent to Alertmanager. Only valid if alert is set.

labels
map[string]string

A set of labels to attach to the result of the query expression.

annotations
map[string]string

A set of annotations to attach to alerts produced by the query expression. Only valid if alert is set.

RuleEvaluatorSpec

(Appears in: OperatorConfig)

RuleEvaluatorSpec defines configuration for deploying rule-evaluator.

Field Description
externalLabels
map[string]string

ExternalLabels specifies external labels that are attached to any rule results and alerts produced by rules. The precedence behavior matches that of Prometheus.

queryProjectID
string

QueryProjectID is the GCP project ID to evaluate rules against. If left blank, the rule-evaluator will try attempt to infer the Project ID from the environment.

generatorUrl
string

The base URL used for the generator URL in the alert notification payload. Should point to an instance of a query frontend that gives access to queryProjectID.

alerting
AlertingSpec

Alerting contains how the rule-evaluator configures alerting.

credentials
Kubernetes core/v1.SecretKeySelector

A reference to GCP service account credentials with which the rule evaluator container is run. It needs to have metric read permissions against queryProjectId and metric write permissions against all projects to which rule results are written. Within GKE, this can typically be left empty if the compute default service account has the required permissions.

RuleGroup

(Appears in: RulesSpec)

RuleGroup declares rules in the Prometheus format: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/

Field Description
name
string

The name of the rule group.

interval
string

The interval at which to evaluate the rules. Must be a valid Prometheus duration.

rules
[]Rule

A list of rules that are executed sequentially as part of this group.

Rules

Rules defines Prometheus alerting and recording rules that are scoped to the namespace of the resource. Only metric data from this namespace is processed and all rule results have their project_id, cluster, and namespace label preserved for query processing. If the location label is not preserved by the rule, it defaults to the cluster’s location.

Field Description
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
RulesSpec

Specification of rules to record and alert on.

status
RulesStatus
(Optional)

Most recently observed status of the resource.

RulesSpec

(Appears in: ClusterRules, GlobalRules, Rules)

RulesSpec contains specification parameters for a Rules resource.

Field Description
groups
[]RuleGroup

A list of Prometheus rule groups.

RulesStatus

(Appears in: ClusterRules, GlobalRules, Rules)

RulesStatus contains status information for a Rules resource.

SampleGroup

(Appears in: ScrapeEndpointStatus)

Field Description
sampleTargets
[]SampleTarget

Targets emitting the error message.

count
int32
(Optional)

Total count of similar errors.

SampleTarget

(Appears in: SampleGroup)

Field Description
labels
github.com/prometheus/common/model.LabelSet

The label set, keys and values, of the target.

lastError
string

Error message.

lastScrapeDurationSeconds
string

Scrape duration in seconds.

health
string

Health status.

ScalingSpec

(Appears in: OperatorConfig)

ScalingSpec defines configuration options for scaling GMP.

Field Description
vpa
VPASpec

ScrapeEndpoint

(Appears in: ClusterPodMonitoringSpec, PodMonitoringSpec)

ScrapeEndpoint specifies a Prometheus metrics endpoint to scrape.

Field Description
port
k8s.io/apimachinery/pkg/util/intstr.IntOrString

Name or number of the port to scrape. The container metadata label is only populated if the port is referenced by name because port numbers are not unique across containers.

scheme
string

Protocol scheme to use to scrape.

path
string

HTTP path to scrape metrics from. Defaults to “/metrics”.

params
map[string][]string

HTTP GET params to use when scraping.

interval
string

Interval at which to scrape metrics. Must be a valid Prometheus duration.

timeout
string

Timeout for metrics scrapes. Must be a valid Prometheus duration. Must not be larger than the scrape interval.

metricRelabeling
[]RelabelingRule

Relabeling rules for metrics scraped from this endpoint. Relabeling rules that override protected target labels (project_id, location, cluster, namespace, job, instance, or address) are not permitted. The labelmap action is not permitted in general.

HTTPClientConfig
HTTPClientConfig

(Members of HTTPClientConfig are embedded into this type.)

Prometheus HTTP client configuration.

ScrapeEndpointStatus

(Appears in: PodMonitoringStatus)

Field Description
name
string

The name of the ScrapeEndpoint.

activeTargets
int64

Total number of active targets.

unhealthyTargets
int64

Total number of active, unhealthy targets.

lastUpdateTime
Kubernetes meta/v1.Time

Last time this status was updated.

sampleGroups
[]SampleGroup

A fixed sample of targets grouped by error type.

collectorsFraction
string

Fraction of collectors included in status, bounded [0,1]. Ideally, this should always be 1. Anything less can be considered a problem and should be investigated.

ScrapeLimits

(Appears in: ClusterNodeMonitoringSpec, ClusterPodMonitoringSpec, PodMonitoringSpec)

ScrapeLimits limits applied to scraped targets.

Field Description
samples
uint64

Maximum number of samples accepted within a single scrape. Uses Prometheus default if left unspecified.

labels
uint64

Maximum number of labels accepted for a single sample. Uses Prometheus default if left unspecified.

labelNameLength
uint64

Maximum label name length. Uses Prometheus default if left unspecified.

labelValueLength
uint64

Maximum label value length. Uses Prometheus default if left unspecified.

ScrapeNodeEndpoint

(Appears in: ClusterNodeMonitoringSpec)

ScrapeNodeEndpoint specifies a Prometheus metrics endpoint on a node to scrape. It contains all the fields used in the ScrapeEndpoint except for port and HTTPClientConfig.

Field Description
scheme
string

Protocol scheme to use to scrape.

path
string

HTTP path to scrape metrics from. Defaults to “/metrics”.

params
map[string][]string

HTTP GET params to use when scraping.

interval
string

Interval at which to scrape metrics. Must be a valid Prometheus duration.

timeout
string

Timeout for metrics scrapes. Must be a valid Prometheus duration. Must not be larger then the scrape interval.

metricRelabeling
[]RelabelingRule

Relabeling rules for metrics scraped from this endpoint. Relabeling rules that override protected target labels (project_id, location, cluster, namespace, job, instance, or address) are not permitted. The labelmap action is not permitted in general.

SecretKeySelector

(Appears in: SecretSelector)

SecretKeySelector represents selector for Kubernetes secret. It’s similar to k8s.io/api/core/v1.SecretKeySelector, but allows cross namespace selections.

Field Description
name
string

Name of the secret to select from.

key
string

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

namespace
string
(Optional)

Namespace of the secret to select from. If empty the parent resource namespace will be chosen.

SecretOrConfigMap

(Appears in: TLSConfig)

SecretOrConfigMap allows to specify data as a Secret or ConfigMap. Fields are mutually exclusive. Taking inspiration from prometheus-operator: https://github.com/prometheus-operator/prometheus-operator/blob/2c81b0cf6a5673e08057499a08ddce396b19dda4/Documentation/api.md#secretorconfigmap

Field Description
secret
Kubernetes core/v1.SecretKeySelector

Secret containing data to use for the targets.

configMap
Kubernetes core/v1.ConfigMapKeySelector

ConfigMap containing data to use for the targets.

SecretSelector

(Appears in: Auth, BasicAuth, OAuth2, TLS)

SecretSelector references a secret from a secret provider e.g. Kubernetes Secret. Only one provider can be used at a time.

Field Description
secret
SecretKeySelector
(Optional)

Secret represents reference to a given key from certain Secret in a given namespace.

TLS

(Appears in: HTTPClientConfig, OAuth2)

TLS specifies TLS configuration used for HTTP requests.

Field Description
serverName
string
(Optional)

ServerName is used to verify the hostname for the targets.

insecureSkipVerify
bool
(Optional)

InsecureSkipVerify disables target certificate validation.

minVersion
string
(Optional)

MinVersion is the minimum TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3).

If unset, Prometheus will use Go default minimum version, which is TLS 1.2. See MinVersion in https://pkg.go.dev/crypto/tls#Config.

maxVersion
string
(Optional)

MaxVersion is the maximum TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3).

If unset, Prometheus will use Go default minimum version, which is TLS 1.2. See MinVersion in https://pkg.go.dev/crypto/tls#Config.

ca
SecretSelector
cert
SecretSelector
(Optional)

Cert uses the secret as the certificate for client authentication to the server.

key
SecretSelector
(Optional)

Key uses the secret as the private key for client authentication to the server.

TLSConfig

(Appears in: AlertmanagerEndpoints)

TLSConfig specifies TLS configuration parameters from Kubernetes resources.

Field Description
ca
SecretOrConfigMap

Struct containing the CA cert to use for the targets.

cert
SecretOrConfigMap

Struct containing the client cert file for the targets.

keySecret
Kubernetes core/v1.SecretKeySelector

Secret containing the client key file for the targets.

serverName
string

Used to verify the hostname for the targets.

insecureSkipVerify
bool

Disable target certificate validation.

minVersion
string

Minimum TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). If unset, Prometheus will use Go default minimum version, which is TLS 1.2. See MinVersion in https://pkg.go.dev/crypto/tls#Config.

maxVersion
string

Maximum TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). If unset, Prometheus will use Go default minimum version, which is TLS 1.2. See MinVersion in https://pkg.go.dev/crypto/tls#Config.

TargetLabels

(Appears in: ClusterPodMonitoringSpec, PodMonitoringSpec)

TargetLabels configures labels for the discovered Prometheus targets.

Field Description
metadata
[]string

Pod metadata labels that are set on all scraped targets. Permitted keys are pod, container, and node for PodMonitoring and pod, container, node, and namespace for ClusterPodMonitoring. The container label is only populated if the scrape port is referenced by name. Defaults to [pod, container] for PodMonitoring and [namespace, pod, container] for ClusterPodMonitoring. If set to null, it will be interpreted as the empty list for PodMonitoring and to [namespace] for ClusterPodMonitoring. This is for backwards-compatibility only.

fromPod
[]LabelMapping

Labels to transfer from the Kubernetes Pod to Prometheus target labels. Mappings are applied in order.

TargetStatusSpec

(Appears in: OperatorFeatures)

TargetStatusSpec holds configuration for target status reporting.

Field Description
enabled
bool

Enable target status reporting.

VPASpec

(Appears in: ScalingSpec)

VPASpec defines configuration options for vertical pod autoscaling.

Field Description
enabled
bool

Enabled configures whether the operator configures Vertical Pod Autoscaling for the collector pods. In GKE, installing Vertical Pod Autoscaling requires a cluster restart, and therefore it also results in an operator restart. In other environments, the operator may need to be restarted to enable VPA to run the following check again and watch for the objects.


Generated with gen-crd-api-reference-docs