API reference

This page is automatically generated with gen-crd-api-reference-docs.

Packages:

monitoring.coreos.com/v1

Resource Types:

Alertmanager

The Alertmanager custom resource definition (CRD) defines a desired Alertmanager setup to run in a Kubernetes cluster. It allows to specify many options such as the number of replicas, persistent storage and many more.

For each Alertmanager resource, the Operator deploys a StatefulSet in the same namespace. When there are two or more configured replicas, the Operator runs the Alertmanager instances in high-availability mode.

The resource defines via label and namespace selectors which AlertmanagerConfig objects should be associated to the deployed Alertmanager instances.

Field Description
apiVersion
string
monitoring.coreos.com/v1
kind
string
Alertmanager
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
AlertmanagerSpec

spec defines the specification of the desired behavior of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status



podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the Alertmanager pods.

The following items are reserved and cannot be overridden: * “alertmanager” label, set to the name of the Alertmanager instance. * “app.kubernetes.io/instance” label, set to the name of the Alertmanager instance. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/name” label, set to “alertmanager”. * “app.kubernetes.io/version” label, set to the Alertmanager version. * “kubectl.kubernetes.io/default-container” annotation, set to “alertmanager”.

image
string
(Optional)

image if specified has precedence over baseImage, tag and sha combinations. Specifying the version is still necessary to ensure the Prometheus Operator knows what version of Alertmanager is being configured.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy for the ‘alertmanager’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

version
string
(Optional)

version the cluster should be on.

tag
string
(Optional)

tag of Alertmanager container image to be deployed. Defaults to the value of version. Version is ignored if Tag is set. Deprecated: use ‘image’ instead. The image tag can be specified as part of the image URL.

sha
string
(Optional)

sha of Alertmanager container image to be deployed. Defaults to the value of version. Similar to a tag, but the SHA explicitly deploys an immutable container image. Version and Tag are ignored if SHA is set. Deprecated: use ‘image’ instead. The image digest can be specified as part of the image URL.

baseImage
string
(Optional)

baseImage that is used to deploy pods, without tag. Deprecated: use ‘image’ instead.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets An optional list of references to secrets in the same namespace to use for pulling prometheus and alertmanager images from registries see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

secrets
[]string
(Optional)

secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. Each Secret is added to the StatefulSet definition as a volume named secret-<secret-name>. The Secrets are mounted into /etc/alertmanager/secrets/<secret-name> in the ‘alertmanager’ container.

configMaps
[]string
(Optional)

configMaps defines a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. Each ConfigMap is added to the StatefulSet definition as a volume named configmap-<configmap-name>. The ConfigMaps are mounted into /etc/alertmanager/configmaps/<configmap-name> in the ‘alertmanager’ container.

configSecret
string
(Optional)

configSecret defines the name of a Kubernetes Secret in the same namespace as the Alertmanager object, which contains the configuration for this Alertmanager instance. If empty, it defaults to alertmanager-<alertmanager-name>.

The Alertmanager configuration should be available under the alertmanager.yaml key. Additional keys from the original secret are copied to the generated secret and mounted into the /etc/alertmanager/config directory in the alertmanager container.

If either the secret or the alertmanager.yaml key is missing, the operator provisions a minimal Alertmanager configuration with one empty receiver (effectively dropping alert notifications).

logLevel
string
(Optional)

logLevel for Alertmanager to be configured with.

logFormat
string
(Optional)

logFormat for Alertmanager to be configured with.

replicas
int32
(Optional)

replicas defines the expected size of the alertmanager cluster. The controller will eventually make the size of the running cluster equal to the expected size.

retention
GoDuration
(Optional)

retention defines the time duration Alertmanager shall retain data for. Default is ‘120h’, and must match the regular expression [0-9]+(ms|s|m|h) (milliseconds seconds minutes hours).

storage
StorageSpec
(Optional)

storage defines the definition of how storage will be used by the Alertmanager instances.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the alertmanager container, that are generated as a result of StorageSpec objects.

persistentVolumeClaimRetentionPolicy
Kubernetes apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy
(Optional)

persistentVolumeClaimRetentionPolicy controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is an alpha field from kubernetes 1.23 until 1.26 and a beta field from 1.26. It requires enabling the StatefulSetAutoDeletePVC feature gate.

externalUrl
string
(Optional)

externalUrl defines the URL used to access the Alertmanager web service. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name.

routePrefix
string
(Optional)

routePrefix Alertmanager registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with kubectl proxy.

paused
bool
(Optional)

paused if set to true all actions on the underlying managed objects are not going to be performed, except for delete actions.

nodeSelector
map[string]string
(Optional)

nodeSelector defines which Nodes the Pods are scheduled on.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resource requests and limits of the Pods.

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines the pod’s scheduling constraints.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines the pod’s tolerations.

topologySpreadConstraints
[]Kubernetes core/v1.TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the Pod’s topology spread constraints.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines the DNS configuration for the pods.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

serviceName
string
(Optional)

serviceName defines the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the Alertmanager resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named alertmanager-operated for Alertmanager resources. When deploying multiple Alertmanager resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

serviceAccountName
string
(Optional)

serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.

listenLocal
bool
(Optional)

listenLocal defines the Alertmanager server listen on loopback, so that it does not bind against the Pod IP. Note this is only for the Alertmanager UI, not the gossip communication.

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch. The current container names are: alertmanager and config-reloader. Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the Alertmanager configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch. The current init container name is: init-config-reloader. Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

priorityClassName
string
(Optional)

priorityClassName assigned to the Pods

additionalPeers
[]string
(Optional)

additionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster.

clusterAdvertiseAddress
string
(Optional)

clusterAdvertiseAddress defines the explicit address to advertise in cluster. Needs to be provided for non RFC1918 1 addresses. [1] RFC1918: https://tools.ietf.org/html/rfc1918

clusterGossipInterval
GoDuration
(Optional)

clusterGossipInterval defines the interval between gossip attempts.

clusterLabel
string
(Optional)

clusterLabel defines the identifier that uniquely identifies the Alertmanager cluster. You should only set it when the Alertmanager cluster includes Alertmanager instances which are external to this Alertmanager resource. In practice, the addresses of the external instances are provided via the .spec.additionalPeers field.

clusterPushpullInterval
GoDuration
(Optional)

clusterPushpullInterval defines the interval between pushpull attempts.

clusterPeerTimeout
GoDuration
(Optional)

clusterPeerTimeout defines the timeout for cluster peering.

portName
string
(Optional)

portName defines the port’s name for the pods and governing service. Defaults to web.

forceEnableClusterMode
bool
(Optional)

forceEnableClusterMode ensures Alertmanager does not deactivate the cluster mode when running with a single replica. Use case is e.g. spanning an Alertmanager cluster across Kubernetes clusters with a single replica in each.

alertmanagerConfigSelector
Kubernetes meta/v1.LabelSelector
(Optional)

alertmanagerConfigSelector defines the selector to be used for to merge and configure Alertmanager with.

alertmanagerConfigNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

alertmanagerConfigNamespaceSelector defines the namespaces to be selected for AlertmanagerConfig discovery. If nil, only check own namespace.

alertmanagerConfigMatcherStrategy
AlertmanagerConfigMatcherStrategy
(Optional)

alertmanagerConfigMatcherStrategy defines how AlertmanagerConfig objects process incoming alerts.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

hostAliases
[]HostAlias
(Optional)

hostAliases Pods configuration

web
AlertmanagerWebSpec
(Optional)

web defines the web command line flags when starting Alertmanager.

limits
AlertmanagerLimitsSpec
(Optional)

limits defines the limits command line flags when starting Alertmanager.

clusterTLS
ClusterTLSConfig
(Optional)

clusterTLS defines the mutual TLS configuration for the Alertmanager cluster’s gossip protocol.

It requires Alertmanager >= 0.24.0.

alertmanagerConfiguration
AlertmanagerConfiguration
(Optional)

alertmanagerConfiguration defines the configuration of Alertmanager.

If defined, it takes precedence over the configSecret field.

This is an experimental feature, it may change in any upcoming release in a breaking way.

automountServiceAccountToken
bool
(Optional)

automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the service account has automountServiceAccountToken: true, set the field to false to opt out of automounting API credentials.

enableFeatures
[]string
(Optional)

enableFeatures defines the Alertmanager’s feature flags. By default, no features are enabled. Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

It requires Alertmanager >= 0.27.0.

additionalArgs
[]Argument
(Optional)

additionalArgs allows setting additional arguments for the ‘Alertmanager’ container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the Alertmanager container which may cause issues if they are invalid or not supported by the given Alertmanager version.

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the Optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 120 seconds.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

status
AlertmanagerStatus
(Optional)

status defines the most recent observed status of the Alertmanager cluster. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

PodMonitor

The PodMonitor custom resource definition (CRD) defines how Prometheus and PrometheusAgent can scrape metrics from a group of pods. Among other things, it allows to specify: * The pods to scrape via label selectors. * The container ports to scrape. * Authentication credentials to use. * Target and metric relabeling.

Prometheus and PrometheusAgent objects select PodMonitor objects using label and namespace selectors.

Field Description
apiVersion
string
monitoring.coreos.com/v1
kind
string
PodMonitor
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
PodMonitorSpec

spec defines the specification of desired Pod selection for target discovery by Prometheus.



jobLabel
string
(Optional)

jobLabel defines 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>).

podTargetLabels
[]string
(Optional)

podTargetLabels defines the labels which are transferred from the associated Kubernetes Pod object onto the ingested metrics.

podMetricsEndpoints
[]PodMetricsEndpoint
(Optional)

podMetricsEndpoints defines how to scrape metrics from the selected pods.

selector
Kubernetes meta/v1.LabelSelector

selector defines the label selector to select the Kubernetes Pod objects to scrape metrics from.

selectorMechanism
SelectorMechanism
(Optional)

selectorMechanism defines the mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated.

It requires Prometheus >= v2.17.0.

namespaceSelector
NamespaceSelector
(Optional)

namespaceSelector defines in which namespace(s) Prometheus should discover the pods. By default, the pods are discovered in the same namespace as the PodMonitor object but it is possible to select pods across different/all namespaces.

sampleLimit
uint64
(Optional)

sampleLimit defines a per-scrape limit on the number of scraped samples that will be accepted.

targetLimit
uint64
(Optional)

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

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.

It requires Prometheus >= v3.0.0.

labelLimit
uint64
(Optional)

labelLimit defines the per-scrape limit on number of labels that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

attachMetadata
AttachMetadata
(Optional)

attachMetadata defines additional metadata which is added to the discovered targets.

It requires Prometheus >= v2.35.0.

scrapeClass
string
(Optional)

scrapeClass defines the scrape class to apply.

bodySizeLimit
ByteSize
(Optional)

bodySizeLimit when defined specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus.

It requires Prometheus >= v2.28.0.

status
ConfigResourceStatus
(Optional)

status defines the status subresource. It is under active development and is updated only when the “StatusForConfigurationResources” feature gate is enabled.

Most recent observed status of the PodMonitor. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Probe

The Probe custom resource definition (CRD) defines how to scrape metrics from prober exporters such as the blackbox exporter.

The Probe resource needs 2 pieces of information: * The list of probed addresses which can be defined statically or by discovering Kubernetes Ingress objects. * The prober which exposes the availability of probed endpoints (over various protocols such HTTP, TCP, ICMP, …) as Prometheus metrics.

Prometheus and PrometheusAgent objects select Probe objects using label and namespace selectors.

Field Description
apiVersion
string
monitoring.coreos.com/v1
kind
string
Probe
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
ProbeSpec

spec defines the specification of desired Ingress selection for target discovery by Prometheus.



jobName
string
(Optional)

jobName assigned to scraped metrics by default.

prober
ProberSpec
(Optional)

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

module
string
(Optional)

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

targets
ProbeTargets
(Optional)

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

interval
Duration
(Optional)

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

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the timeout for scraping metrics from the Prometheus exporter. If not specified, the Prometheus global scrape timeout is used. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to use when scraping the endpoint.

bearerTokenSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

bearerTokenSecret defines the 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.

basicAuth
BasicAuth
(Optional)

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

oauth2
OAuth2
(Optional)

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

metricRelabelings
[]RelabelConfig
(Optional)

metricRelabelings defines the RelabelConfig to apply to samples before ingestion.

authorization
SafeAuthorization
(Optional)

authorization section for this endpoint

sampleLimit
uint64
(Optional)

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

targetLimit
uint64
(Optional)

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

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.

It requires Prometheus >= v3.0.0.

labelLimit
uint64
(Optional)

labelLimit defines the 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
uint64
(Optional)

labelNameLengthLimit defines the 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
uint64
(Optional)

labelValueLengthLimit defines the 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.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

scrapeClass
string
(Optional)

scrapeClass defines the scrape class to apply.

params
[]ProbeParam
(Optional)

params defines the list of HTTP query parameters for the scrape. Please note that the .spec.module field takes precedence over the module parameter from this list when both are defined. The module name must be added using Module under ProbeSpec.

status
ConfigResourceStatus
(Optional)

status defines the status subresource. It is under active development and is updated only when the “StatusForConfigurationResources” feature gate is enabled.

Most recent observed status of the Probe. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Prometheus

The Prometheus custom resource definition (CRD) defines a desired Prometheus setup to run in a Kubernetes cluster. It allows to specify many options such as the number of replicas, persistent storage, and Alertmanagers where firing alerts should be sent and many more.

For each Prometheus resource, the Operator deploys one or several StatefulSet objects in the same namespace. The number of StatefulSets is equal to the number of shards which is 1 by default.

The resource defines via label and namespace selectors which ServiceMonitor, PodMonitor, Probe and PrometheusRule objects should be associated to the deployed Prometheus instances.

The Operator continuously reconciles the scrape and rules configuration and a sidecar container running in the Prometheus pods triggers a reload of the configuration when needed.

Field Description
apiVersion
string
monitoring.coreos.com/v1
kind
string
Prometheus
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
PrometheusSpec

spec defines the specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status



podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the Prometheus pods.

The following items are reserved and cannot be overridden: * “prometheus” label, set to the name of the Prometheus object. * “app.kubernetes.io/instance” label, set to the name of the Prometheus object. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/name” label, set to “prometheus”. * “app.kubernetes.io/version” label, set to the Prometheus version. * “operator.prometheus.io/name” label, set to the name of the Prometheus object. * “operator.prometheus.io/shard” label, set to the shard number of the Prometheus object. * “kubectl.kubernetes.io/default-container” annotation, set to “prometheus”.

serviceMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorSelector defines the serviceMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

serviceMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorNamespaceSelector defines the namespaces to match for ServicedMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

podMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorSelector defines the podMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

podMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorNamespaceSelector defines the namespaces to match for PodMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

probeSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeSelector defines the probes to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

probeNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeNamespaceSelector defines the namespaces to match for Probe discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

scrapeConfigSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigSelector defines the scrapeConfigs to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

scrapeConfigNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigNamespaceSelector defines the namespaces to match for ScrapeConfig discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

version
string
(Optional)

version of Prometheus being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.

If not specified, the operator assumes the latest upstream version of Prometheus available at the time when the version of the operator was released.

paused
bool
(Optional)

paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.

image
string
(Optional)

image defines the container image name for Prometheus. If specified, it takes precedence over the spec.baseImage, spec.tag and spec.sha fields.

Specifying spec.version is still necessary to ensure the Prometheus Operator knows which version of Prometheus is being configured.

If neither spec.image nor spec.baseImage are defined, the operator will use the latest upstream version of Prometheus available at the time when the operator was released.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy defines the image pull policy for the ‘prometheus’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

replicas
int32
(Optional)

replicas defines the number of replicas of each shard to deploy for a Prometheus deployment. spec.replicas multiplied by spec.shards is the total number of Pods created.

Default: 1

shards
int32
(Optional)

shards defines the number of shards to distribute the scraped targets onto.

spec.replicas multiplied by spec.shards is the total number of Pods being created.

When not defined, the operator assumes only one shard.

Note that scaling down shards will not reshard data onto the remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally, use either * Thanos sidecar + querier for query federation and Thanos Ruler for rules. * Remote-write to send metrics to a central location.

By default, the sharding of targets is performed on: * The __address__ target’s metadata label for PodMonitor, ServiceMonitor and ScrapeConfig resources. * The __param_target__ label for Probe resources.

Users can define their own sharding implementation by setting the __tmp_hash label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class).

You can also disable sharding on a specific target by setting the __tmp_disable_sharding label with relabeling configuration. When the label value isn’t empty, all Prometheus shards will scrape the target.

replicaExternalLabelName
string
(Optional)

replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus_replica”

prometheusExternalLabelName
string
(Optional)

prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus”

logLevel
string
(Optional)

logLevel for Prometheus and the config-reloader sidecar.

logFormat
string
(Optional)

logFormat for Log level for Prometheus and the config-reloader sidecar.

scrapeInterval
Duration
(Optional)

scrapeInterval defines interval between consecutive scrapes.

Default: “30s”

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

PrometheusText1.0.0 requires Prometheus >= v3.0.0.

externalLabels
map[string]string
(Optional)

externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). Labels defined by spec.replicaExternalLabelName and spec.prometheusExternalLabelName take precedence over this list.

enableRemoteWriteReceiver
bool
(Optional)

enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.

WARNING: This is not considered an efficient way of ingesting samples. Use it with caution for specific low-volume use cases. It is not suitable for replacing the ingestion via scraping and turning Prometheus into a push-based metrics collection system. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver

It requires Prometheus >= v2.33.0.

enableOTLPReceiver
bool
(Optional)

enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.

Note that the OTLP receiver endpoint is automatically enabled if .spec.otlpConfig is defined.

It requires Prometheus >= v2.47.0.

remoteWriteReceiverMessageVersions
[]RemoteWriteMessageVersion
(Optional)

remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.

It requires Prometheus >= v2.54.0.

enableFeatures
[]EnableFeature
(Optional)

enableFeatures enables access to Prometheus feature flags. By default, no features are enabled.

Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/

externalUrl
string
(Optional)

externalUrl defines the external URL under which the Prometheus service is externally available. This is necessary to generate correct URLs (for instance if Prometheus is accessible behind an Ingress resource).

routePrefix
string
(Optional)

routePrefix defines the route prefix Prometheus registers HTTP handlers for.

This is useful when using spec.externalURL, and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with kubectl proxy.

storage
StorageSpec
(Optional)

storage defines the storage used by Prometheus.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes allows the configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts allows the configuration of additional VolumeMounts.

VolumeMounts will be appended to other VolumeMounts in the ‘prometheus’ container, that are generated as a result of StorageSpec objects.

persistentVolumeClaimRetentionPolicy
Kubernetes apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy
(Optional)

persistentVolumeClaimRetentionPolicy defines the field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is an alpha field from kubernetes 1.23 until 1.26 and a beta field from 1.26. It requires enabling the StatefulSetAutoDeletePVC feature gate.

web
PrometheusWebSpec
(Optional)

web defines the configuration of the Prometheus web server.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resources requests and limits of the ‘prometheus’ container.

nodeSelector
map[string]string
(Optional)

nodeSelector defines on which Nodes the Pods are scheduled.

serviceAccountName
string
(Optional)

serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.

automountServiceAccountToken
bool
(Optional)

automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the field isn’t 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.

secrets
[]string
(Optional)

secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each Secret is added to the StatefulSet definition as a volume named secret-<secret-name>. The Secrets are mounted into /etc/prometheus/secrets/ in the ‘prometheus’ container.

configMaps
[]string
(Optional)

configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each ConfigMap is added to the StatefulSet definition as a volume named configmap-<configmap-name>. The ConfigMaps are mounted into /etc/prometheus/configmaps/ in the ‘prometheus’ container.

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines the Pods’ affinity scheduling rules if specified.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines the Pods’ tolerations if specified.

topologySpreadConstraints
[]TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the pod’s topology spread constraints if specified.

remoteWrite
[]RemoteWriteSpec
(Optional)

remoteWrite defines the list of remote write configurations.

otlp
OTLPConfig
(Optional)

otlp defines the settings related to the OTLP receiver feature. It requires Prometheus >= v2.55.0.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines the DNS configuration for the pods.

listenLocal
bool
(Optional)

listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP’s address.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch.

The names of containers managed by the operator are: * prometheus * config-reloader * thanos-sidecar

Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.

The names of init container name managed by the operator are: * init-config-reloader.

Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

additionalScrapeConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalScrapeConfigs allows specifying a key of a Secret containing additional Prometheus scrape configurations. Scrape configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible scrape configs are going to break Prometheus after the upgrade.

apiserverConfig
APIServerConfig
(Optional)

apiserverConfig allows specifying a host and auth methods to access the Kuberntees API server. If null, Prometheus is assumed to run inside of the cluster: it will discover the API servers automatically and use the Pod’s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.

priorityClassName
string
(Optional)

priorityClassName assigned to the Pods.

portName
string
(Optional)

portName used for the pods and governing service. Default: “web”

arbitraryFSAccessThroughSMs
ArbitraryFSAccessThroughSMsConfig
(Optional)

arbitraryFSAccessThroughSMs when true, ServiceMonitor, PodMonitor and Probe object are forbidden to reference arbitrary files on the file system of the ‘prometheus’ container. When a ServiceMonitor’s endpoint specifies a bearerTokenFile value (e.g. ‘/var/run/secrets/kubernetes.io/serviceaccount/token’), a malicious target can get access to the Prometheus service account’s token in the Prometheus’ scrape request. Setting spec.arbitraryFSAccessThroughSM to ‘true’ would prevent the attack. Users should instead provide the credentials using the spec.bearerTokenSecret field.

overrideHonorLabels
bool
(Optional)

overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped data to “exported_” for all targets created from ServiceMonitor, PodMonitor and ScrapeConfig objects. Otherwise the HonorLabels field of the service or pod monitor applies. In practice,OverrideHonorLabels:true enforces honorLabels:false for all ServiceMonitor, PodMonitor and ScrapeConfig objects.

overrideHonorTimestamps
bool
(Optional)

overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors. Otherwise the HonorTimestamps field of the service or pod monitor applies.

ignoreNamespaceSelectors
bool
(Optional)

ignoreNamespaceSelectors when true, spec.namespaceSelector from all PodMonitor, ServiceMonitor and Probe objects will be ignored. They will only discover targets within the namespace of the PodMonitor, ServiceMonitor and Probe object.

enforcedNamespaceLabel
string
(Optional)

enforcedNamespaceLabel when not empty, a label will be added to:

  1. All metrics scraped from ServiceMonitor, PodMonitor, Probe and ScrapeConfig objects.
  2. All metrics generated from recording rules defined in PrometheusRule objects.
  3. All alerts generated from alerting rules defined in PrometheusRule objects.
  4. All vector selectors of PromQL expressions defined in PrometheusRule objects.

The label will not added for objects referenced in spec.excludedFromEnforcement.

The label’s name is this field’s value. The label’s value is the namespace of the ServiceMonitor, PodMonitor, Probe, PrometheusRule or ScrapeConfig object.

enforcedSampleLimit
uint64
(Optional)

enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted. This overrides any spec.sampleLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.sampleLimit is greater than zero and less than spec.enforcedSampleLimit.

It is meant to be used by admins to keep the overall number of samples/series under a desired limit.

When both enforcedSampleLimit and sampleLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined sampleLimit value will inherit the global sampleLimit value (Prometheus >= 2.45.0) or the enforcedSampleLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedSampleLimit is greater than the sampleLimit, the sampleLimit will be set to enforcedSampleLimit. * Scrape objects with a sampleLimit value less than or equal to enforcedSampleLimit keep their specific value. * Scrape objects with a sampleLimit value greater than enforcedSampleLimit are set to enforcedSampleLimit.

enforcedTargetLimit
uint64
(Optional)

enforcedTargetLimit when defined specifies a global limit on the number of scraped targets. The value overrides any spec.targetLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.targetLimit is greater than zero and less than spec.enforcedTargetLimit.

It is meant to be used by admins to to keep the overall number of targets under a desired limit.

When both enforcedTargetLimit and targetLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined targetLimit value will inherit the global targetLimit value (Prometheus >= 2.45.0) or the enforcedTargetLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedTargetLimit is greater than the targetLimit, the targetLimit will be set to enforcedTargetLimit. * Scrape objects with a targetLimit value less than or equal to enforcedTargetLimit keep their specific value. * Scrape objects with a targetLimit value greater than enforcedTargetLimit are set to enforcedTargetLimit.

enforcedLabelLimit
uint64
(Optional)

enforcedLabelLimit when defined specifies a global limit on the number of labels per sample. The value overrides any spec.labelLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelLimit is greater than zero and less than spec.enforcedLabelLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelLimit and labelLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelLimit value will inherit the global labelLimit value (Prometheus >= 2.45.0) or the enforcedLabelLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelLimit is greater than the labelLimit, the labelLimit will be set to enforcedLabelLimit. * Scrape objects with a labelLimit value less than or equal to enforcedLabelLimit keep their specific value. * Scrape objects with a labelLimit value greater than enforcedLabelLimit are set to enforcedLabelLimit.

enforcedLabelNameLengthLimit
uint64
(Optional)

enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample. The value overrides any spec.labelNameLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelNameLengthLimit is greater than zero and less than spec.enforcedLabelNameLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelNameLengthLimit and labelNameLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelNameLengthLimit value will inherit the global labelNameLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelNameLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelNameLengthLimit is greater than the labelNameLengthLimit, the labelNameLengthLimit will be set to enforcedLabelNameLengthLimit. * Scrape objects with a labelNameLengthLimit value less than or equal to enforcedLabelNameLengthLimit keep their specific value. * Scrape objects with a labelNameLengthLimit value greater than enforcedLabelNameLengthLimit are set to enforcedLabelNameLengthLimit.

enforcedLabelValueLengthLimit
uint64
(Optional)

enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample. The value overrides any spec.labelValueLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelValueLengthLimit is greater than zero and less than spec.enforcedLabelValueLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelValueLengthLimit and labelValueLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelValueLengthLimit value will inherit the global labelValueLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelValueLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelValueLengthLimit is greater than the labelValueLengthLimit, the labelValueLengthLimit will be set to enforcedLabelValueLengthLimit. * Scrape objects with a labelValueLengthLimit value less than or equal to enforcedLabelValueLengthLimit keep their specific value. * Scrape objects with a labelValueLengthLimit value greater than enforcedLabelValueLengthLimit are set to enforcedLabelValueLengthLimit.

enforcedKeepDroppedTargets
uint64
(Optional)

enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory. The value overrides any spec.keepDroppedTargets set by ServiceMonitor, PodMonitor, Probe objects unless spec.keepDroppedTargets is greater than zero and less than spec.enforcedKeepDroppedTargets.

It requires Prometheus >= v2.47.0.

When both enforcedKeepDroppedTargets and keepDroppedTargets are defined and greater than zero, the following rules apply: * Scrape objects without a defined keepDroppedTargets value will inherit the global keepDroppedTargets value (Prometheus >= 2.45.0) or the enforcedKeepDroppedTargets value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedKeepDroppedTargets is greater than the keepDroppedTargets, the keepDroppedTargets will be set to enforcedKeepDroppedTargets. * Scrape objects with a keepDroppedTargets value less than or equal to enforcedKeepDroppedTargets keep their specific value. * Scrape objects with a keepDroppedTargets value greater than enforcedKeepDroppedTargets are set to enforcedKeepDroppedTargets.

enforcedBodySizeLimit
ByteSize
(Optional)

enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus. Targets responding with a body larger than this many bytes will cause the scrape to fail.

It requires Prometheus >= v2.28.0.

When both enforcedBodySizeLimit and bodySizeLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined bodySizeLimit value will inherit the global bodySizeLimit value (Prometheus >= 2.45.0) or the enforcedBodySizeLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedBodySizeLimit is greater than the bodySizeLimit, the bodySizeLimit will be set to enforcedBodySizeLimit. * Scrape objects with a bodySizeLimit value less than or equal to enforcedBodySizeLimit keep their specific value. * Scrape objects with a bodySizeLimit value greater than enforcedBodySizeLimit are set to enforcedBodySizeLimit.

nameValidationScheme
NameValidationSchemeOptions
(Optional)

nameValidationScheme defines the validation scheme for metric and label names.

It requires Prometheus >= v2.55.0.

nameEscapingScheme
NameEscapingSchemeOptions
(Optional)

nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.

It requires Prometheus >= v3.4.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.

It requires Prometheus >= v3.4.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

It requires Prometheus >= v3.5.0.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created Pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

hostAliases
[]HostAlias
(Optional)

hostAliases defines the optional list of hosts and IPs that will be injected into the Pod’s hosts file if specified.

additionalArgs
[]Argument
(Optional)

additionalArgs allows setting additional arguments for the ‘prometheus’ container.

It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the Prometheus container which may cause issues if they are invalid or not supported by the given Prometheus version.

In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged.

walCompression
bool
(Optional)

walCompression defines the compression of the write-ahead log (WAL) using Snappy.

WAL compression is enabled by default for Prometheus >= 2.20.0

Requires Prometheus v2.11.0 and above.

excludedFromEnforcement
[]ObjectReference
(Optional)

excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.

It is only applicable if spec.enforcedNamespaceLabel set to true.

hostNetwork
bool
(Optional)

hostNetwork defines the host’s network namespace if true.

Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/ ).

When hostNetwork is enabled, this will set the DNS policy to ClusterFirstWithHostNet automatically (unless .spec.DNSPolicy is set to a different value).

podTargetLabels
[]string
(Optional)

podTargetLabels are appended to the spec.podTargetLabels field of all PodMonitor and ServiceMonitor objects.

tracingConfig
PrometheusTracingConfig
(Optional)

tracingConfig defines tracing in Prometheus.

This is an experimental feature, it may change in any upcoming release in a breaking way.

bodySizeLimit
ByteSize
(Optional)

bodySizeLimit defines per-scrape on response body size. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedBodySizeLimit.

sampleLimit
uint64
(Optional)

sampleLimit defines per-scrape limit on number of scraped samples that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedSampleLimit.

targetLimit
uint64
(Optional)

targetLimit defines a limit on the number of scraped targets that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedTargetLimit.

labelLimit
uint64
(Optional)

labelLimit defines per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelLimit.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelNameLengthLimit.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelValueLengthLimit.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedKeepDroppedTargets.

reloadStrategy
ReloadStrategyType
(Optional)

reloadStrategy defines the strategy used to reload the Prometheus configuration. If not specified, the configuration is reloaded using the /-/reload HTTP endpoint.

maximumStartupDurationSeconds
int32
(Optional)

maximumStartupDurationSeconds defines the maximum time that the prometheus container’s startup probe will wait before being considered failed. The startup probe will return 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 minutes).

scrapeClasses
[]ScrapeClass
(Optional)

scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.

This is an experimental feature, it may change in any upcoming release in a breaking way.

serviceDiscoveryRole
ServiceDiscoveryRole
(Optional)

serviceDiscoveryRole defines the service discovery role used to discover targets from ServiceMonitor objects and Alertmanager endpoints.

If set, the value should be either “Endpoints” or “EndpointSlice”. If unset, the operator assumes the “Endpoints” role.

tsdb
TSDBSpec
(Optional)

tsdb defines the runtime reloadable configuration of the timeseries database(TSDB). It requires Prometheus >= v2.39.0 or PrometheusAgent >= v2.54.0.

scrapeFailureLogFile
string
(Optional)

scrapeFailureLogFile defines the file to which scrape failures are logged. Reloading the configuration will reopen the file.

If the filename has an empty path, e.g. ‘file.log’, The Prometheus Pods will mount the file into an emptyDir volume at /var/log/prometheus. If a full path is provided, e.g. ‘/var/log/prometheus/file.log’, you must mount a volume in the specified directory and it must be writable. It requires Prometheus >= v2.55.0.

serviceName
string
(Optional)

serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the Prometheus/PrometheusAgent resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named prometheus-operated for Prometheus resources, or prometheus-agent-operated for PrometheusAgent resources. When deploying multiple Prometheus/PrometheusAgent resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

runtime
RuntimeConfig
(Optional)

runtime defines the values for the Prometheus process behavior

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 600 seconds.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

baseImage
string
(Optional)

baseImage is deprecated: use ‘spec.image’ instead.

tag
string
(Optional)

tag is deprecated: use ‘spec.image’ instead. The image’s tag can be specified as part of the image name.

sha
string
(Optional)

sha is deprecated: use ‘spec.image’ instead. The image’s digest can be specified as part of the image name.

retention
Duration
(Optional)

retention defines how long to retain the Prometheus data.

Default: “24h” if spec.retention and spec.retentionSize are empty.

retentionSize
ByteSize
(Optional)

retentionSize defines the maximum number of bytes used by the Prometheus data.

shardRetentionPolicy
ShardRetentionPolicy
(Optional)

shardRetentionPolicy defines the retention policy for the Prometheus shards. (Alpha) Using this field requires the ‘PrometheusShardRetentionPolicy’ feature gate to be enabled.

The final goals for this feature can be seen at https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/proposals/202310-shard-autoscaling.md#graceful-scale-down-of-prometheus-servers, however, the feature is not yet fully implemented in this PR. The limitation being: * Retention duration is not settable, for now, shards are retained forever.

disableCompaction
bool
(Optional)

disableCompaction when true, the Prometheus compaction is disabled. When spec.thanos.objectStorageConfig or spec.objectStorageConfigFile are defined, the operator automatically disables block compaction to avoid race conditions during block uploads (as the Thanos documentation recommends).

rules
Rules
(Optional)

rules defines the configuration of the Prometheus rules’ engine.

prometheusRulesExcludedFromEnforce
[]PrometheusRuleExcludeConfig
(Optional)

prometheusRulesExcludedFromEnforce defines the list of PrometheusRule objects to which the namespace label enforcement doesn’t apply. This is only relevant when spec.enforcedNamespaceLabel is set to true. Deprecated: use spec.excludedFromEnforcement instead.

ruleSelector
Kubernetes meta/v1.LabelSelector
(Optional)

ruleSelector defines the prometheusRule objects to be selected for rule evaluation. An empty label selector matches all objects. A null label selector matches no objects.

ruleNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

ruleNamespaceSelector defines the namespaces to match for PrometheusRule discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

query
QuerySpec
(Optional)

query defines the configuration of the Prometheus query service.

alerting
AlertingSpec
(Optional)

alerting defines the settings related to Alertmanager.

additionalAlertRelabelConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalAlertRelabelConfigs defines a key of a Secret containing additional Prometheus alert relabel configurations. The alert relabel configurations are appended to the configuration generated by the Prometheus Operator. They must be formatted according to the official Prometheus documentation:

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs

The user is responsible for making sure that the configurations are valid

Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible alert relabel configs are going to break Prometheus after the upgrade.

additionalAlertManagerConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalAlertManagerConfigs defines a key of a Secret containing additional Prometheus Alertmanager configurations. The Alertmanager configurations are appended to the configuration generated by the Prometheus Operator. They must be formatted according to the official Prometheus documentation:

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config

The user is responsible for making sure that the configurations are valid

Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible AlertManager configs are going to break Prometheus after the upgrade.

remoteRead
[]RemoteReadSpec
(Optional)

remoteRead defines the list of remote read configurations.

thanos
ThanosSpec
(Optional)

thanos defines the configuration of the optional Thanos sidecar.

queryLogFile
string
(Optional)

queryLogFile specifies where the file to which PromQL queries are logged.

If the filename has an empty path, e.g. ‘query.log’, The Prometheus Pods will mount the file into an emptyDir volume at /var/log/prometheus. If a full path is provided, e.g. ‘/var/log/prometheus/query.log’, you must mount a volume in the specified directory and it must be writable. This is because the prometheus container runs with a read-only root filesystem for security reasons. Alternatively, the location can be set to a standard I/O stream, e.g. /dev/stdout, to log query information to the default Prometheus log stream.

allowOverlappingBlocks
bool
(Optional)

allowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus.

Deprecated: this flag has no effect for Prometheus >= 2.39.0 where overlapping blocks are enabled by default.

exemplars
Exemplars
(Optional)

exemplars related settings that are runtime reloadable. It requires to enable the exemplar-storage feature flag to be effective.

evaluationInterval
Duration
(Optional)

evaluationInterval defines the interval between rule evaluations. Default: “30s”

ruleQueryOffset
Duration
(Optional)

ruleQueryOffset defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past. It requires Prometheus >= v2.53.0.

enableAdminAPI
bool
(Optional)

enableAdminAPI defines access to the Prometheus web admin API.

WARNING: Enabling the admin APIs enables mutating endpoints, to delete data, shutdown Prometheus, and more. Enabling this should be done with care and the user is advised to add additional authentication authorization via a proxy to ensure only clients authorized to perform these actions can do so.

For more information: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis

status
PrometheusStatus
(Optional)

status defines the most recent observed status of the Prometheus cluster. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

PrometheusRule

The PrometheusRule custom resource definition (CRD) defines alerting and recording rules to be evaluated by Prometheus or ThanosRuler objects.

Prometheus and ThanosRuler objects select PrometheusRule objects using label and namespace selectors.

Field Description
apiVersion
string
monitoring.coreos.com/v1
kind
string
PrometheusRule
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
PrometheusRuleSpec

spec defines the specification of desired alerting rule definitions for Prometheus.



groups
[]RuleGroup
(Optional)

groups defines the content of Prometheus rule file

ServiceMonitor

The ServiceMonitor custom resource definition (CRD) defines how Prometheus and PrometheusAgent can scrape metrics from a group of services. Among other things, it allows to specify: * The services to scrape via label selectors. * The container ports to scrape. * Authentication credentials to use. * Target and metric relabeling.

Prometheus and PrometheusAgent objects select ServiceMonitor objects using label and namespace selectors.

Field Description
apiVersion
string
monitoring.coreos.com/v1
kind
string
ServiceMonitor
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
ServiceMonitorSpec

spec defines the specification of desired Service selection for target discovery by Prometheus.



jobLabel
string
(Optional)

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.

targetLabels
[]string
(Optional)

targetLabels defines the labels which are transferred from the associated Kubernetes Service object onto the ingested metrics.

podTargetLabels
[]string
(Optional)

podTargetLabels defines the labels which are transferred from the associated Kubernetes Pod object onto the ingested metrics.

endpoints
[]Endpoint

endpoints defines the list of endpoints part of this ServiceMonitor. Defines how to scrape metrics from Kubernetes Endpoints objects. In most cases, an Endpoints object is backed by a Kubernetes Service object with the same name and labels.

selector
Kubernetes meta/v1.LabelSelector

selector defines the label selector to select the Kubernetes Endpoints objects to scrape metrics from.

selectorMechanism
SelectorMechanism
(Optional)

selectorMechanism defines the mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated.

It requires Prometheus >= v2.17.0.

namespaceSelector
NamespaceSelector
(Optional)

namespaceSelector defines in which namespace(s) Prometheus should discover the services. By default, the services are discovered in the same namespace as the ServiceMonitor object but it is possible to select pods across different/all namespaces.

sampleLimit
uint64
(Optional)

sampleLimit defines a per-scrape limit on the number of scraped samples that will be accepted.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.

It requires Prometheus >= v3.0.0.

targetLimit
uint64
(Optional)

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

labelLimit
uint64
(Optional)

labelLimit defines the per-scrape limit on number of labels that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

attachMetadata
AttachMetadata
(Optional)

attachMetadata defines additional metadata which is added to the discovered targets.

It requires Prometheus >= v2.37.0.

scrapeClass
string
(Optional)

scrapeClass defines the scrape class to apply.

bodySizeLimit
ByteSize
(Optional)

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

status
ConfigResourceStatus
(Optional)

status defines the status subresource. It is under active development and is updated only when the “StatusForConfigurationResources” feature gate is enabled.

Most recent observed status of the ServiceMonitor. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

ThanosRuler

The ThanosRuler custom resource definition (CRD) defines a desired Thanos Ruler setup to run in a Kubernetes cluster.

A ThanosRuler instance requires at least one compatible Prometheus API endpoint (either Thanos Querier or Prometheus services).

The resource defines via label and namespace selectors which PrometheusRule objects should be associated to the deployed Thanos Ruler instances.

Field Description
apiVersion
string
monitoring.coreos.com/v1
kind
string
ThanosRuler
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
ThanosRulerSpec

spec defines the specification of the desired behavior of the ThanosRuler cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status



version
string
(Optional)

version of Thanos to be deployed.

podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the ThanosRuler pods.

The following items are reserved and cannot be overridden: * “app.kubernetes.io/name” label, set to “thanos-ruler”. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/instance” label, set to the name of the ThanosRuler instance. * “thanos-ruler” label, set to the name of the ThanosRuler instance. * “kubectl.kubernetes.io/default-container” annotation, set to “thanos-ruler”.

image
string
(Optional)

image defines Thanos container image URL.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy defines for the ‘thanos’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets defines an optional list of references to secrets in the same namespace to use for pulling thanos images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

paused
bool
(Optional)

paused defines when a ThanosRuler deployment is paused, no actions except for deletion will be performed on the underlying objects.

replicas
int32
(Optional)

replicas defines the number of thanos ruler instances to deploy.

nodeSelector
map[string]string
(Optional)

nodeSelector defines which Nodes the Pods are scheduled on.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resource requirements for single Pods. If not provided, no requests/limits will be set

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines when specified, the pod’s scheduling constraints.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines when specified, the pod’s tolerations.

topologySpreadConstraints
[]Kubernetes core/v1.TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the pod’s topology spread constraints.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext defines the pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines Defines the DNS configuration for the pods.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

priorityClassName
string
(Optional)

priorityClassName defines the priority class assigned to the Pods

serviceName
string
(Optional)

serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the ThanosRuler resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named thanos-ruler-operated for ThanosRuler resources. When deploying multiple ThanosRuler resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

serviceAccountName
string
(Optional)

serviceAccountName defines the name of the ServiceAccount to use to run the Thanos Ruler Pods.

storage
StorageSpec
(Optional)

storage defines the specification of how storage shall be used.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes defines how configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts defines how the configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the ruler container, that are generated as a result of StorageSpec objects.

objectStorageConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

objectStorageConfig defines the configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage

The operator performs no validation of the configuration.

objectStorageConfigFile takes precedence over this field.

objectStorageConfigFile
string
(Optional)

objectStorageConfigFile defines the path of the object storage configuration file.

The configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage

The operator performs no validation of the configuration file.

This field takes precedence over objectStorageConfig.

listenLocal
bool
(Optional)

listenLocal defines the Thanos ruler listen on loopback, so that it does not bind against the Pod IP.

queryEndpoints
[]string
(Optional)

queryEndpoints defines the list of Thanos Query endpoints from which to query metrics.

For Thanos >= v0.11.0, it is recommended to use queryConfig instead.

queryConfig takes precedence over this field.

queryConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

queryConfig defines the list of Thanos Query endpoints from which to query metrics.

The configuration format is defined at https://thanos.io/tip/components/rule.md/#query-api

It requires Thanos >= v0.11.0.

The operator performs no validation of the configuration.

This field takes precedence over queryEndpoints.

alertmanagersUrl
[]string
(Optional)

alertmanagersUrl defines the list of Alertmanager endpoints to send alerts to.

For Thanos >= v0.10.0, it is recommended to use alertmanagersConfig instead.

alertmanagersConfig takes precedence over this field.

alertmanagersConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

alertmanagersConfig defines the list of Alertmanager endpoints to send alerts to.

The configuration format is defined at https://thanos.io/tip/components/rule.md/#alertmanager.

It requires Thanos >= v0.10.0.

The operator performs no validation of the configuration.

This field takes precedence over alertmanagersUrl.

ruleSelector
Kubernetes meta/v1.LabelSelector
(Optional)

ruleSelector defines the PrometheusRule objects to be selected for rule evaluation. An empty label selector matches all objects. A null label selector matches no objects.

ruleNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

ruleNamespaceSelector defines the namespaces to be selected for Rules discovery. If unspecified, only the same namespace as the ThanosRuler object is in is used.

enforcedNamespaceLabel
string
(Optional)

enforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created.

excludedFromEnforcement
[]ObjectReference
(Optional)

excludedFromEnforcement defines the list of references to PrometheusRule objects to be excluded from enforcing a namespace label of origin. Applies only if enforcedNamespaceLabel set to true.

prometheusRulesExcludedFromEnforce
[]PrometheusRuleExcludeConfig
(Optional)

prometheusRulesExcludedFromEnforce defines a list of Prometheus rules to be excluded from enforcing of adding namespace labels. Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair Deprecated: use excludedFromEnforcement instead.

logLevel
string
(Optional)

logLevel for ThanosRuler to be configured with.

logFormat
string
(Optional)

logFormat for ThanosRuler to be configured with.

portName
string
(Optional)

portName defines the port name used for the pods and governing service. Defaults to web.

evaluationInterval
Duration
(Optional)

evaluationInterval defines the interval between consecutive evaluations.

resendDelay
Duration
(Optional)

resendDelay defines the minimum amount of time to wait before resending an alert to Alertmanager.

ruleOutageTolerance
Duration
(Optional)

ruleOutageTolerance defines the max time to tolerate prometheus outage for restoring “for” state of alert. It requires Thanos >= v0.30.0.

ruleQueryOffset
Duration
(Optional)

ruleQueryOffset defines the default rule group’s query offset duration to use. It requires Thanos >= v0.38.0.

ruleConcurrentEval
int32
(Optional)

ruleConcurrentEval defines how many rules can be evaluated concurrently. It requires Thanos >= v0.37.0.

ruleGracePeriod
Duration
(Optional)

ruleGracePeriod defines the minimum duration between alert and restored “for” state. This is maintained only for alerts with configured “for” time greater than grace period. It requires Thanos >= v0.30.0.

retention
Duration
(Optional)

retention defines the time duration ThanosRuler shall retain data for. Default is ‘24h’, and must match the regular expression [0-9]+(ms|s|m|h|d|w|y) (milliseconds seconds minutes hours days weeks years).

The field has no effect when remote-write is configured since the Ruler operates in stateless mode.

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to a ThanosRuler pod or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch. The current container names are: thanos-ruler and config-reloader. Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the ThanosRuler configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ Using initContainers for any use case other then secret fetching is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

tracingConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

tracingConfig defines the tracing configuration.

The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration

This is an experimental feature, it may change in any upcoming release in a breaking way.

The operator performs no validation of the configuration.

tracingConfigFile takes precedence over this field.

tracingConfigFile
string
(Optional)

tracingConfigFile defines the path of the tracing configuration file.

The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration

This is an experimental feature, it may change in any upcoming release in a breaking way.

The operator performs no validation of the configuration file.

This field takes precedence over tracingConfig.

labels
map[string]string
(Optional)

labels defines the external label pairs of the ThanosRuler resource.

A default replica label thanos_ruler_replica will be always added as a label with the value of the pod’s name.

alertDropLabels
[]string
(Optional)

alertDropLabels defines the label names which should be dropped in Thanos Ruler alerts.

The replica label thanos_ruler_replica will always be dropped from the alerts.

externalPrefix
string
(Optional)

externalPrefix defines the Thanos Ruler instances will be available under. This is necessary to generate correct URLs. This is necessary if Thanos Ruler is not served from root of a DNS name.

routePrefix
string
(Optional)

routePrefix defines the route prefix ThanosRuler registers HTTP handlers for. This allows thanos UI to be served on a sub-path.

grpcServerTlsConfig
TLSConfig
(Optional)

grpcServerTlsConfig defines the gRPC server from which Thanos Querier reads recorded rule data. Note: Currently only the CAFile, CertFile, and KeyFile fields are supported. Maps to the ‘–grpc-server-tls-*’ CLI args.

alertQueryUrl
string
(Optional)

alertQueryUrl defines how Thanos Ruler will set in the ‘Source’ field of all alerts. Maps to the ‘–alert.query-url’ CLI arg.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

alertRelabelConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

alertRelabelConfigs defines the alert relabeling in Thanos Ruler.

Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs

The operator performs no validation of the configuration.

alertRelabelConfigFile takes precedence over this field.

alertRelabelConfigFile
string
(Optional)

alertRelabelConfigFile defines the path to the alert relabeling configuration file.

Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs

The operator performs no validation of the configuration file.

This field takes precedence over alertRelabelConfig.

hostAliases
[]HostAlias
(Optional)

hostAliases defines pods’ hostAliases configuration

additionalArgs
[]Argument
(Optional)

additionalArgs defines how to add additional arguments for the ThanosRuler container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the ThanosRuler container which may cause issues if they are invalid or not supported by the given ThanosRuler version. In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument the reconciliation will fail and an error will be logged.

web
ThanosRulerWebSpec
(Optional)

web defines the configuration of the ThanosRuler web server.

remoteWrite
[]RemoteWriteSpec
(Optional)

remoteWrite defines the list of remote write configurations.

When the list isn’t empty, the ruler is configured with stateless mode.

It requires Thanos >= 0.24.0.

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 120 seconds.

enableFeatures
[]EnableFeature
(Optional)

enableFeatures defines how to setup Thanos Ruler feature flags. By default, no features are enabled.

Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

For more information see https://thanos.io/tip/components/rule.md/

It requires Thanos >= 0.39.0.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

status
ThanosRulerStatus
(Optional)

status defines the most recent observed status of the ThanosRuler cluster. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

APIServerConfig

(Appears on:CommonPrometheusFields)

APIServerConfig defines how the Prometheus server connects to the Kubernetes API server.

More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config

Field Description
host
string

host defines the Kubernetes API address consisting of a hostname or IP address followed by an optional port number.

basicAuth
BasicAuth
(Optional)

basicAuth configuration for the API server.

Cannot be set at the same time as authorization, bearerToken, or bearerTokenFile.

bearerTokenFile
string
(Optional)

bearerTokenFile defines the file to read bearer token for accessing apiserver.

Cannot be set at the same time as basicAuth, authorization, or bearerToken.

Deprecated: this will be removed in a future release. Prefer using authorization.

tlsConfig
TLSConfig
(Optional)

tlsConfig to use for the API server.

authorization
Authorization
(Optional)

authorization section for the API server.

Cannot be set at the same time as basicAuth, bearerToken, or bearerTokenFile.

bearerToken
string
(Optional)

bearerToken is deprecated: this will be removed in a future release. Warning: this field shouldn’t be used because the token value appears in clear-text. Prefer using authorization.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

AdditionalLabelSelectors (string alias)

(Appears on:TopologySpreadConstraint)

Value Description

"OnResource"

Automatically add a label selector that will select all pods matching the same Prometheus/PrometheusAgent resource (irrespective of their shards).

"OnShard"

Automatically add a label selector that will select all pods matching the same shard.

AlertingSpec

(Appears on:PrometheusSpec)

AlertingSpec defines parameters for alerting configuration of Prometheus servers.

Field Description
alertmanagers
[]AlertmanagerEndpoints

alertmanagers endpoints where Prometheus should send alerts to.

AlertmanagerAPIVersion (string alias)

(Appears on:AlertmanagerEndpoints)

Value Description

"V1"

"V2"

AlertmanagerConfigMatcherStrategy

(Appears on:AlertmanagerSpec)

Field Description
type
AlertmanagerConfigMatcherStrategyType
(Optional)

type defines the strategy used by AlertmanagerConfig objects to match alerts in the routes and inhibition rules.

The default value is OnNamespace.

AlertmanagerConfigMatcherStrategyType (string alias)

(Appears on:AlertmanagerConfigMatcherStrategy)

Value Description

"None"

With None, the route and inhibition rules of an AlertmanagerConfig object process all incoming alerts.

"OnNamespace"

With OnNamespace, the route and inhibition rules of an AlertmanagerConfig object only process alerts that have a namespace label equal to the namespace of the object.

"OnNamespaceExceptForAlertmanagerNamespace"

With OnNamespaceExceptForAlertmanagerNamespace, the route and inhibition rules of an AlertmanagerConfig object only process alerts that have a namespace label equal to the namespace of the object, unless the AlertmanagerConfig object is in the same namespace as the Alertmanager object, where it will process all alerts.

AlertmanagerConfiguration

(Appears on:AlertmanagerSpec)

AlertmanagerConfiguration defines the Alertmanager configuration.

Field Description
name
string
(Optional)

name defines the name of the AlertmanagerConfig custom resource which is used to generate the Alertmanager configuration. It must be defined in the same namespace as the Alertmanager object. The operator will not enforce a namespace label for routes and inhibition rules.

global
AlertmanagerGlobalConfig
(Optional)

global defines the global parameters of the Alertmanager configuration.

templates
[]SecretOrConfigMap
(Optional)

templates defines the custom notification templates.

AlertmanagerEndpoints

(Appears on:AlertingSpec)

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

Field Description
namespace
string
(Optional)

namespace of the Endpoints object.

If not set, the object will be discovered in the namespace of the Prometheus object.

name
string

name of the Endpoints object in the namespace.

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

port on which the Alertmanager API is exposed.

scheme
string
(Optional)

scheme to use when firing alerts.

pathPrefix
string
(Optional)

pathPrefix defines the prefix for the HTTP path alerts are pushed to.

tlsConfig
TLSConfig
(Optional)

tlsConfig to use for Alertmanager.

basicAuth
BasicAuth
(Optional)

basicAuth configuration for Alertmanager.

Cannot be set at the same time as bearerTokenFile, authorization or sigv4.

bearerTokenFile
string
(Optional)

bearerTokenFile defines the file to read bearer token for Alertmanager.

Cannot be set at the same time as basicAuth, authorization, or sigv4.

Deprecated: this will be removed in a future release. Prefer using authorization.

authorization
SafeAuthorization
(Optional)

authorization section for Alertmanager.

Cannot be set at the same time as basicAuth, bearerTokenFile or sigv4.

sigv4
Sigv4
(Optional)

sigv4 defines AWS’s Signature Verification 4 for the URL.

It requires Prometheus >= v2.48.0.

Cannot be set at the same time as basicAuth, bearerTokenFile or authorization.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

apiVersion
AlertmanagerAPIVersion
(Optional)

apiVersion defines the version of the Alertmanager API that Prometheus uses to send alerts. It can be “V1” or “V2”. The field has no effect for Prometheus >= v3.0.0 because only the v2 API is supported.

timeout
Duration
(Optional)

timeout defines a per-target Alertmanager timeout when pushing alerts.

enableHttp2
bool
(Optional)

enableHttp2 defines whether to enable HTTP2.

relabelings
[]RelabelConfig
(Optional)

relabelings defines the relabel configuration applied to the discovered Alertmanagers.

alertRelabelings
[]RelabelConfig
(Optional)

alertRelabelings defines the relabeling configs applied before sending alerts to a specific Alertmanager. It requires Prometheus >= v2.51.0.

AlertmanagerGlobalConfig

(Appears on:AlertmanagerConfiguration)

AlertmanagerGlobalConfig configures parameters that are valid in all other configuration contexts. See https://prometheus.io/docs/alerting/latest/configuration/#configuration-file

Field Description
smtp
GlobalSMTPConfig
(Optional)

smtp defines global SMTP parameters.

resolveTimeout
Duration
(Optional)

resolveTimeout defines the default value used by alertmanager if the alert does not include EndsAt, after this time passes it can declare the alert as resolved if it has not been updated. This has no impact on alerts from Prometheus, as they always include EndsAt.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the default HTTP configuration.

slackApiUrl
Kubernetes core/v1.SecretKeySelector
(Optional)

slackApiUrl defines the default Slack API URL.

opsGenieApiUrl
Kubernetes core/v1.SecretKeySelector
(Optional)

opsGenieApiUrl defines the default OpsGenie API URL.

opsGenieApiKey
Kubernetes core/v1.SecretKeySelector
(Optional)

opsGenieApiKey defines the default OpsGenie API Key.

pagerdutyUrl
string
(Optional)

pagerdutyUrl defines the default Pagerduty URL.

telegram
GlobalTelegramConfig
(Optional)

telegram defines the default Telegram config

jira
GlobalJiraConfig
(Optional)

jira defines the default configuration for Jira.

victorops
GlobalVictorOpsConfig
(Optional)

victorops defines the default configuration for VictorOps.

rocketChat
GlobalRocketChatConfig
(Optional)

rocketChat defines the default configuration for Rocket Chat.

webex
GlobalWebexConfig
(Optional)

webex defines the default configuration for Jira.

wechat
GlobalWeChatConfig
(Optional)

wechat defines the default WeChat Config

AlertmanagerLimitsSpec

(Appears on:AlertmanagerSpec)

AlertmanagerLimitsSpec defines the limits command line flags when starting Alertmanager.

Field Description
maxSilences
int32
(Optional)

maxSilences defines the maximum number active and pending silences. This corresponds to the Alertmanager’s --silences.max-silences flag. It requires Alertmanager >= v0.28.0.

maxPerSilenceBytes
ByteSize
(Optional)

maxPerSilenceBytes defines the maximum size of an individual silence as stored on disk. This corresponds to the Alertmanager’s --silences.max-per-silence-bytes flag. It requires Alertmanager >= v0.28.0.

AlertmanagerSpec

(Appears on:Alertmanager)

AlertmanagerSpec is a specification of the desired behavior of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Field Description
podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the Alertmanager pods.

The following items are reserved and cannot be overridden: * “alertmanager” label, set to the name of the Alertmanager instance. * “app.kubernetes.io/instance” label, set to the name of the Alertmanager instance. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/name” label, set to “alertmanager”. * “app.kubernetes.io/version” label, set to the Alertmanager version. * “kubectl.kubernetes.io/default-container” annotation, set to “alertmanager”.

image
string
(Optional)

image if specified has precedence over baseImage, tag and sha combinations. Specifying the version is still necessary to ensure the Prometheus Operator knows what version of Alertmanager is being configured.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy for the ‘alertmanager’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

version
string
(Optional)

version the cluster should be on.

tag
string
(Optional)

tag of Alertmanager container image to be deployed. Defaults to the value of version. Version is ignored if Tag is set. Deprecated: use ‘image’ instead. The image tag can be specified as part of the image URL.

sha
string
(Optional)

sha of Alertmanager container image to be deployed. Defaults to the value of version. Similar to a tag, but the SHA explicitly deploys an immutable container image. Version and Tag are ignored if SHA is set. Deprecated: use ‘image’ instead. The image digest can be specified as part of the image URL.

baseImage
string
(Optional)

baseImage that is used to deploy pods, without tag. Deprecated: use ‘image’ instead.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets An optional list of references to secrets in the same namespace to use for pulling prometheus and alertmanager images from registries see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

secrets
[]string
(Optional)

secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. Each Secret is added to the StatefulSet definition as a volume named secret-<secret-name>. The Secrets are mounted into /etc/alertmanager/secrets/<secret-name> in the ‘alertmanager’ container.

configMaps
[]string
(Optional)

configMaps defines a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. Each ConfigMap is added to the StatefulSet definition as a volume named configmap-<configmap-name>. The ConfigMaps are mounted into /etc/alertmanager/configmaps/<configmap-name> in the ‘alertmanager’ container.

configSecret
string
(Optional)

configSecret defines the name of a Kubernetes Secret in the same namespace as the Alertmanager object, which contains the configuration for this Alertmanager instance. If empty, it defaults to alertmanager-<alertmanager-name>.

The Alertmanager configuration should be available under the alertmanager.yaml key. Additional keys from the original secret are copied to the generated secret and mounted into the /etc/alertmanager/config directory in the alertmanager container.

If either the secret or the alertmanager.yaml key is missing, the operator provisions a minimal Alertmanager configuration with one empty receiver (effectively dropping alert notifications).

logLevel
string
(Optional)

logLevel for Alertmanager to be configured with.

logFormat
string
(Optional)

logFormat for Alertmanager to be configured with.

replicas
int32
(Optional)

replicas defines the expected size of the alertmanager cluster. The controller will eventually make the size of the running cluster equal to the expected size.

retention
GoDuration
(Optional)

retention defines the time duration Alertmanager shall retain data for. Default is ‘120h’, and must match the regular expression [0-9]+(ms|s|m|h) (milliseconds seconds minutes hours).

storage
StorageSpec
(Optional)

storage defines the definition of how storage will be used by the Alertmanager instances.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the alertmanager container, that are generated as a result of StorageSpec objects.

persistentVolumeClaimRetentionPolicy
Kubernetes apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy
(Optional)

persistentVolumeClaimRetentionPolicy controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is an alpha field from kubernetes 1.23 until 1.26 and a beta field from 1.26. It requires enabling the StatefulSetAutoDeletePVC feature gate.

externalUrl
string
(Optional)

externalUrl defines the URL used to access the Alertmanager web service. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name.

routePrefix
string
(Optional)

routePrefix Alertmanager registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with kubectl proxy.

paused
bool
(Optional)

paused if set to true all actions on the underlying managed objects are not going to be performed, except for delete actions.

nodeSelector
map[string]string
(Optional)

nodeSelector defines which Nodes the Pods are scheduled on.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resource requests and limits of the Pods.

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines the pod’s scheduling constraints.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines the pod’s tolerations.

topologySpreadConstraints
[]Kubernetes core/v1.TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the Pod’s topology spread constraints.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines the DNS configuration for the pods.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

serviceName
string
(Optional)

serviceName defines the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the Alertmanager resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named alertmanager-operated for Alertmanager resources. When deploying multiple Alertmanager resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

serviceAccountName
string
(Optional)

serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.

listenLocal
bool
(Optional)

listenLocal defines the Alertmanager server listen on loopback, so that it does not bind against the Pod IP. Note this is only for the Alertmanager UI, not the gossip communication.

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch. The current container names are: alertmanager and config-reloader. Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the Alertmanager configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch. The current init container name is: init-config-reloader. Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

priorityClassName
string
(Optional)

priorityClassName assigned to the Pods

additionalPeers
[]string
(Optional)

additionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster.

clusterAdvertiseAddress
string
(Optional)

clusterAdvertiseAddress defines the explicit address to advertise in cluster. Needs to be provided for non RFC1918 1 addresses. [1] RFC1918: https://tools.ietf.org/html/rfc1918

clusterGossipInterval
GoDuration
(Optional)

clusterGossipInterval defines the interval between gossip attempts.

clusterLabel
string
(Optional)

clusterLabel defines the identifier that uniquely identifies the Alertmanager cluster. You should only set it when the Alertmanager cluster includes Alertmanager instances which are external to this Alertmanager resource. In practice, the addresses of the external instances are provided via the .spec.additionalPeers field.

clusterPushpullInterval
GoDuration
(Optional)

clusterPushpullInterval defines the interval between pushpull attempts.

clusterPeerTimeout
GoDuration
(Optional)

clusterPeerTimeout defines the timeout for cluster peering.

portName
string
(Optional)

portName defines the port’s name for the pods and governing service. Defaults to web.

forceEnableClusterMode
bool
(Optional)

forceEnableClusterMode ensures Alertmanager does not deactivate the cluster mode when running with a single replica. Use case is e.g. spanning an Alertmanager cluster across Kubernetes clusters with a single replica in each.

alertmanagerConfigSelector
Kubernetes meta/v1.LabelSelector
(Optional)

alertmanagerConfigSelector defines the selector to be used for to merge and configure Alertmanager with.

alertmanagerConfigNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

alertmanagerConfigNamespaceSelector defines the namespaces to be selected for AlertmanagerConfig discovery. If nil, only check own namespace.

alertmanagerConfigMatcherStrategy
AlertmanagerConfigMatcherStrategy
(Optional)

alertmanagerConfigMatcherStrategy defines how AlertmanagerConfig objects process incoming alerts.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

hostAliases
[]HostAlias
(Optional)

hostAliases Pods configuration

web
AlertmanagerWebSpec
(Optional)

web defines the web command line flags when starting Alertmanager.

limits
AlertmanagerLimitsSpec
(Optional)

limits defines the limits command line flags when starting Alertmanager.

clusterTLS
ClusterTLSConfig
(Optional)

clusterTLS defines the mutual TLS configuration for the Alertmanager cluster’s gossip protocol.

It requires Alertmanager >= 0.24.0.

alertmanagerConfiguration
AlertmanagerConfiguration
(Optional)

alertmanagerConfiguration defines the configuration of Alertmanager.

If defined, it takes precedence over the configSecret field.

This is an experimental feature, it may change in any upcoming release in a breaking way.

automountServiceAccountToken
bool
(Optional)

automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the service account has automountServiceAccountToken: true, set the field to false to opt out of automounting API credentials.

enableFeatures
[]string
(Optional)

enableFeatures defines the Alertmanager’s feature flags. By default, no features are enabled. Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

It requires Alertmanager >= 0.27.0.

additionalArgs
[]Argument
(Optional)

additionalArgs allows setting additional arguments for the ‘Alertmanager’ container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the Alertmanager container which may cause issues if they are invalid or not supported by the given Alertmanager version.

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the Optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 120 seconds.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

AlertmanagerStatus

(Appears on:Alertmanager)

AlertmanagerStatus is the most recent observed status of the Alertmanager cluster. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Field Description
paused
bool
(Optional)

paused defines whether any actions on the underlying managed objects are being performed. Only delete actions will be performed.

replicas
int32
(Optional)

replicas defines the total number of non-terminated pods targeted by this Alertmanager object (their labels match the selector).

updatedReplicas
int32
(Optional)

updatedReplicas defines the total number of non-terminated pods targeted by this Alertmanager object that have the desired version spec.

availableReplicas
int32
(Optional)

availableReplicas defines the total number of available pods (ready for at least minReadySeconds) targeted by this Alertmanager cluster.

unavailableReplicas
int32
(Optional)

unavailableReplicas defines the total number of unavailable pods targeted by this Alertmanager object.

selector
string
(Optional)

selector used to match the pods targeted by this Alertmanager object.

conditions
[]Condition
(Optional)

conditions defines the current state of the Alertmanager object.

AlertmanagerWebSpec

(Appears on:AlertmanagerSpec)

AlertmanagerWebSpec defines the web command line flags when starting Alertmanager.

Field Description
tlsConfig
WebTLSConfig
(Optional)

tlsConfig defines the TLS parameters for HTTPS.

httpConfig
WebHTTPConfig
(Optional)

httpConfig defines HTTP parameters for web server.

getConcurrency
uint32
(Optional)

getConcurrency defines the maximum number of GET requests processed concurrently. This corresponds to the Alertmanager’s --web.get-concurrency flag.

timeout
uint32
(Optional)

timeout for HTTP requests. This corresponds to the Alertmanager’s --web.timeout flag.

ArbitraryFSAccessThroughSMsConfig

(Appears on:CommonPrometheusFields)

ArbitraryFSAccessThroughSMsConfig enables users to configure, whether a service monitor selected by the Prometheus instance is allowed to use arbitrary files on the file system of the Prometheus container. This is the case when e.g. a service monitor specifies a BearerTokenFile in an endpoint. A malicious user could create a service monitor selecting arbitrary secret files in the Prometheus container. Those secrets would then be sent with a scrape request by Prometheus to a malicious target. Denying the above would prevent the attack, users can instead use the BearerTokenSecret field.

Field Description
deny
bool
(Optional)

deny prevents service monitors from accessing arbitrary files on the file system. When true, service monitors cannot use file-based configurations like BearerTokenFile that could potentially access sensitive files. When false (default), such access is allowed. Setting this to true enhances security by preventing potential credential theft attacks.

Argument

(Appears on:AlertmanagerSpec, CommonPrometheusFields, ThanosRulerSpec, ThanosSpec)

Argument as part of the AdditionalArgs list.

Field Description
name
string

name of the argument, e.g. “scrape.discovery-reload-interval”.

value
string
(Optional)

value defines the argument value, e.g. 30s. Can be empty for name-only arguments (e.g. –storage.tsdb.no-lockfile)

AttachMetadata

(Appears on:PodMonitorSpec, ScrapeClass, ServiceMonitorSpec)

Field Description
node
bool
(Optional)

node when set to true, Prometheus attaches node metadata to the discovered targets.

The Prometheus service account must have the list and watch permissions on the Nodes objects.

Authorization

(Appears on:APIServerConfig, RemoteReadSpec, RemoteWriteSpec, ScrapeClass)

Field Description
type
string
(Optional)

type defines the authentication type. The value is case-insensitive.

“Basic” is not a supported value.

Default: “Bearer”

credentials
Kubernetes core/v1.SecretKeySelector
(Optional)

credentials defines a key of a Secret in the namespace that contains the credentials for authentication.

credentialsFile
string
(Optional)

credentialsFile defines the file to read a secret from, mutually exclusive with credentials.

AzureAD

(Appears on:RemoteWriteSpec)

AzureAD defines the configuration for remote write’s azuread parameters.

Field Description
cloud
string
(Optional)

cloud defines the Azure Cloud. Options are ‘AzurePublic’, ‘AzureChina’, or ‘AzureGovernment’.

managedIdentity
ManagedIdentity
(Optional)

managedIdentity defines the Azure User-assigned Managed identity. Cannot be set at the same time as oauth or sdk.

oauth
AzureOAuth
(Optional)

oauth defines the oauth config that is being used to authenticate. Cannot be set at the same time as managedIdentity or sdk.

It requires Prometheus >= v2.48.0 or Thanos >= v0.31.0.

sdk
AzureSDK
(Optional)

sdk defines the Azure SDK config that is being used to authenticate. See https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication Cannot be set at the same time as oauth or managedIdentity.

It requires Prometheus >= v2.52.0 or Thanos >= v0.36.0.

AzureOAuth

(Appears on:AzureAD)

AzureOAuth defines the Azure OAuth settings.

Field Description
clientId
string

clientId defines the clientId of the Azure Active Directory application that is being used to authenticate.

clientSecret
Kubernetes core/v1.SecretKeySelector

clientSecret specifies a key of a Secret containing the client secret of the Azure Active Directory application that is being used to authenticate.

tenantId
string

tenantId is the tenant ID of the Azure Active Directory application that is being used to authenticate.

AzureSDK

(Appears on:AzureAD)

AzureSDK is used to store azure SDK config values.

Field Description
tenantId
string
(Optional)

tenantId defines the tenant ID of the azure active directory application that is being used to authenticate.

BasicAuth

(Appears on:APIServerConfig, AlertmanagerEndpoints, Endpoint, HTTPConfig, PodMetricsEndpoint, ProbeSpec, RemoteReadSpec, RemoteWriteSpec, AzureSDConfig, ConsulSDConfig, DockerSDConfig, DockerSwarmSDConfig, EurekaSDConfig, HTTPConfig, HTTPSDConfig, HetznerSDConfig, KubernetesSDConfig, KumaSDConfig, LightSailSDConfig, NomadSDConfig, PuppetDBSDConfig, ScrapeConfigSpec, HTTPConfig)

BasicAuth configures HTTP Basic Authentication settings.

Field Description
username
Kubernetes core/v1.SecretKeySelector
(Optional)

username defines a key of a Secret containing the username for authentication.

password
Kubernetes core/v1.SecretKeySelector
(Optional)

password defines a key of a Secret containing the password for authentication.

ByteSize (string alias)

(Appears on:AlertmanagerLimitsSpec, CommonPrometheusFields, PodMonitorSpec, PrometheusSpec, ServiceMonitorSpec)

ByteSize is a valid memory size type based on powers-of-2, so 1KB is 1024B. Supported units: B, KB, KiB, MB, MiB, GB, GiB, TB, TiB, PB, PiB, EB, EiB Ex: 512MB.

ClusterTLSConfig

(Appears on:AlertmanagerSpec)

ClusterTLSConfig defines the mutual TLS configuration for the Alertmanager cluster TLS protocol.

Field Description
server
WebTLSConfig

server defines the server-side configuration for mutual TLS.

client
SafeTLSConfig

client defines the client-side configuration for mutual TLS.

CommonPrometheusFields

(Appears on:PrometheusSpec, PrometheusAgentSpec)

CommonPrometheusFields are the options available to both the Prometheus server and agent.

Field Description
podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the Prometheus pods.

The following items are reserved and cannot be overridden: * “prometheus” label, set to the name of the Prometheus object. * “app.kubernetes.io/instance” label, set to the name of the Prometheus object. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/name” label, set to “prometheus”. * “app.kubernetes.io/version” label, set to the Prometheus version. * “operator.prometheus.io/name” label, set to the name of the Prometheus object. * “operator.prometheus.io/shard” label, set to the shard number of the Prometheus object. * “kubectl.kubernetes.io/default-container” annotation, set to “prometheus”.

serviceMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorSelector defines the serviceMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

serviceMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorNamespaceSelector defines the namespaces to match for ServicedMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

podMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorSelector defines the podMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

podMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorNamespaceSelector defines the namespaces to match for PodMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

probeSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeSelector defines the probes to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

probeNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeNamespaceSelector defines the namespaces to match for Probe discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

scrapeConfigSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigSelector defines the scrapeConfigs to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

scrapeConfigNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigNamespaceSelector defines the namespaces to match for ScrapeConfig discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

version
string
(Optional)

version of Prometheus being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.

If not specified, the operator assumes the latest upstream version of Prometheus available at the time when the version of the operator was released.

paused
bool
(Optional)

paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.

image
string
(Optional)

image defines the container image name for Prometheus. If specified, it takes precedence over the spec.baseImage, spec.tag and spec.sha fields.

Specifying spec.version is still necessary to ensure the Prometheus Operator knows which version of Prometheus is being configured.

If neither spec.image nor spec.baseImage are defined, the operator will use the latest upstream version of Prometheus available at the time when the operator was released.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy defines the image pull policy for the ‘prometheus’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

replicas
int32
(Optional)

replicas defines the number of replicas of each shard to deploy for a Prometheus deployment. spec.replicas multiplied by spec.shards is the total number of Pods created.

Default: 1

shards
int32
(Optional)

shards defines the number of shards to distribute the scraped targets onto.

spec.replicas multiplied by spec.shards is the total number of Pods being created.

When not defined, the operator assumes only one shard.

Note that scaling down shards will not reshard data onto the remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally, use either * Thanos sidecar + querier for query federation and Thanos Ruler for rules. * Remote-write to send metrics to a central location.

By default, the sharding of targets is performed on: * The __address__ target’s metadata label for PodMonitor, ServiceMonitor and ScrapeConfig resources. * The __param_target__ label for Probe resources.

Users can define their own sharding implementation by setting the __tmp_hash label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class).

You can also disable sharding on a specific target by setting the __tmp_disable_sharding label with relabeling configuration. When the label value isn’t empty, all Prometheus shards will scrape the target.

replicaExternalLabelName
string
(Optional)

replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus_replica”

prometheusExternalLabelName
string
(Optional)

prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus”

logLevel
string
(Optional)

logLevel for Prometheus and the config-reloader sidecar.

logFormat
string
(Optional)

logFormat for Log level for Prometheus and the config-reloader sidecar.

scrapeInterval
Duration
(Optional)

scrapeInterval defines interval between consecutive scrapes.

Default: “30s”

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

PrometheusText1.0.0 requires Prometheus >= v3.0.0.

externalLabels
map[string]string
(Optional)

externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). Labels defined by spec.replicaExternalLabelName and spec.prometheusExternalLabelName take precedence over this list.

enableRemoteWriteReceiver
bool
(Optional)

enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.

WARNING: This is not considered an efficient way of ingesting samples. Use it with caution for specific low-volume use cases. It is not suitable for replacing the ingestion via scraping and turning Prometheus into a push-based metrics collection system. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver

It requires Prometheus >= v2.33.0.

enableOTLPReceiver
bool
(Optional)

enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.

Note that the OTLP receiver endpoint is automatically enabled if .spec.otlpConfig is defined.

It requires Prometheus >= v2.47.0.

remoteWriteReceiverMessageVersions
[]RemoteWriteMessageVersion
(Optional)

remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.

It requires Prometheus >= v2.54.0.

enableFeatures
[]EnableFeature
(Optional)

enableFeatures enables access to Prometheus feature flags. By default, no features are enabled.

Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/

externalUrl
string
(Optional)

externalUrl defines the external URL under which the Prometheus service is externally available. This is necessary to generate correct URLs (for instance if Prometheus is accessible behind an Ingress resource).

routePrefix
string
(Optional)

routePrefix defines the route prefix Prometheus registers HTTP handlers for.

This is useful when using spec.externalURL, and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with kubectl proxy.

storage
StorageSpec
(Optional)

storage defines the storage used by Prometheus.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes allows the configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts allows the configuration of additional VolumeMounts.

VolumeMounts will be appended to other VolumeMounts in the ‘prometheus’ container, that are generated as a result of StorageSpec objects.

persistentVolumeClaimRetentionPolicy
Kubernetes apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy
(Optional)

persistentVolumeClaimRetentionPolicy defines the field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is an alpha field from kubernetes 1.23 until 1.26 and a beta field from 1.26. It requires enabling the StatefulSetAutoDeletePVC feature gate.

web
PrometheusWebSpec
(Optional)

web defines the configuration of the Prometheus web server.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resources requests and limits of the ‘prometheus’ container.

nodeSelector
map[string]string
(Optional)

nodeSelector defines on which Nodes the Pods are scheduled.

serviceAccountName
string
(Optional)

serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.

automountServiceAccountToken
bool
(Optional)

automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the field isn’t 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.

secrets
[]string
(Optional)

secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each Secret is added to the StatefulSet definition as a volume named secret-<secret-name>. The Secrets are mounted into /etc/prometheus/secrets/ in the ‘prometheus’ container.

configMaps
[]string
(Optional)

configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each ConfigMap is added to the StatefulSet definition as a volume named configmap-<configmap-name>. The ConfigMaps are mounted into /etc/prometheus/configmaps/ in the ‘prometheus’ container.

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines the Pods’ affinity scheduling rules if specified.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines the Pods’ tolerations if specified.

topologySpreadConstraints
[]TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the pod’s topology spread constraints if specified.

remoteWrite
[]RemoteWriteSpec
(Optional)

remoteWrite defines the list of remote write configurations.

otlp
OTLPConfig
(Optional)

otlp defines the settings related to the OTLP receiver feature. It requires Prometheus >= v2.55.0.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines the DNS configuration for the pods.

listenLocal
bool
(Optional)

listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP’s address.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch.

The names of containers managed by the operator are: * prometheus * config-reloader * thanos-sidecar

Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.

The names of init container name managed by the operator are: * init-config-reloader.

Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

additionalScrapeConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalScrapeConfigs allows specifying a key of a Secret containing additional Prometheus scrape configurations. Scrape configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible scrape configs are going to break Prometheus after the upgrade.

apiserverConfig
APIServerConfig
(Optional)

apiserverConfig allows specifying a host and auth methods to access the Kuberntees API server. If null, Prometheus is assumed to run inside of the cluster: it will discover the API servers automatically and use the Pod’s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.

priorityClassName
string
(Optional)

priorityClassName assigned to the Pods.

portName
string
(Optional)

portName used for the pods and governing service. Default: “web”

arbitraryFSAccessThroughSMs
ArbitraryFSAccessThroughSMsConfig
(Optional)

arbitraryFSAccessThroughSMs when true, ServiceMonitor, PodMonitor and Probe object are forbidden to reference arbitrary files on the file system of the ‘prometheus’ container. When a ServiceMonitor’s endpoint specifies a bearerTokenFile value (e.g. ‘/var/run/secrets/kubernetes.io/serviceaccount/token’), a malicious target can get access to the Prometheus service account’s token in the Prometheus’ scrape request. Setting spec.arbitraryFSAccessThroughSM to ‘true’ would prevent the attack. Users should instead provide the credentials using the spec.bearerTokenSecret field.

overrideHonorLabels
bool
(Optional)

overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped data to “exported_” for all targets created from ServiceMonitor, PodMonitor and ScrapeConfig objects. Otherwise the HonorLabels field of the service or pod monitor applies. In practice,OverrideHonorLabels:true enforces honorLabels:false for all ServiceMonitor, PodMonitor and ScrapeConfig objects.

overrideHonorTimestamps
bool
(Optional)

overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors. Otherwise the HonorTimestamps field of the service or pod monitor applies.

ignoreNamespaceSelectors
bool
(Optional)

ignoreNamespaceSelectors when true, spec.namespaceSelector from all PodMonitor, ServiceMonitor and Probe objects will be ignored. They will only discover targets within the namespace of the PodMonitor, ServiceMonitor and Probe object.

enforcedNamespaceLabel
string
(Optional)

enforcedNamespaceLabel when not empty, a label will be added to:

  1. All metrics scraped from ServiceMonitor, PodMonitor, Probe and ScrapeConfig objects.
  2. All metrics generated from recording rules defined in PrometheusRule objects.
  3. All alerts generated from alerting rules defined in PrometheusRule objects.
  4. All vector selectors of PromQL expressions defined in PrometheusRule objects.

The label will not added for objects referenced in spec.excludedFromEnforcement.

The label’s name is this field’s value. The label’s value is the namespace of the ServiceMonitor, PodMonitor, Probe, PrometheusRule or ScrapeConfig object.

enforcedSampleLimit
uint64
(Optional)

enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted. This overrides any spec.sampleLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.sampleLimit is greater than zero and less than spec.enforcedSampleLimit.

It is meant to be used by admins to keep the overall number of samples/series under a desired limit.

When both enforcedSampleLimit and sampleLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined sampleLimit value will inherit the global sampleLimit value (Prometheus >= 2.45.0) or the enforcedSampleLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedSampleLimit is greater than the sampleLimit, the sampleLimit will be set to enforcedSampleLimit. * Scrape objects with a sampleLimit value less than or equal to enforcedSampleLimit keep their specific value. * Scrape objects with a sampleLimit value greater than enforcedSampleLimit are set to enforcedSampleLimit.

enforcedTargetLimit
uint64
(Optional)

enforcedTargetLimit when defined specifies a global limit on the number of scraped targets. The value overrides any spec.targetLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.targetLimit is greater than zero and less than spec.enforcedTargetLimit.

It is meant to be used by admins to to keep the overall number of targets under a desired limit.

When both enforcedTargetLimit and targetLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined targetLimit value will inherit the global targetLimit value (Prometheus >= 2.45.0) or the enforcedTargetLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedTargetLimit is greater than the targetLimit, the targetLimit will be set to enforcedTargetLimit. * Scrape objects with a targetLimit value less than or equal to enforcedTargetLimit keep their specific value. * Scrape objects with a targetLimit value greater than enforcedTargetLimit are set to enforcedTargetLimit.

enforcedLabelLimit
uint64
(Optional)

enforcedLabelLimit when defined specifies a global limit on the number of labels per sample. The value overrides any spec.labelLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelLimit is greater than zero and less than spec.enforcedLabelLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelLimit and labelLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelLimit value will inherit the global labelLimit value (Prometheus >= 2.45.0) or the enforcedLabelLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelLimit is greater than the labelLimit, the labelLimit will be set to enforcedLabelLimit. * Scrape objects with a labelLimit value less than or equal to enforcedLabelLimit keep their specific value. * Scrape objects with a labelLimit value greater than enforcedLabelLimit are set to enforcedLabelLimit.

enforcedLabelNameLengthLimit
uint64
(Optional)

enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample. The value overrides any spec.labelNameLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelNameLengthLimit is greater than zero and less than spec.enforcedLabelNameLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelNameLengthLimit and labelNameLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelNameLengthLimit value will inherit the global labelNameLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelNameLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelNameLengthLimit is greater than the labelNameLengthLimit, the labelNameLengthLimit will be set to enforcedLabelNameLengthLimit. * Scrape objects with a labelNameLengthLimit value less than or equal to enforcedLabelNameLengthLimit keep their specific value. * Scrape objects with a labelNameLengthLimit value greater than enforcedLabelNameLengthLimit are set to enforcedLabelNameLengthLimit.

enforcedLabelValueLengthLimit
uint64
(Optional)

enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample. The value overrides any spec.labelValueLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelValueLengthLimit is greater than zero and less than spec.enforcedLabelValueLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelValueLengthLimit and labelValueLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelValueLengthLimit value will inherit the global labelValueLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelValueLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelValueLengthLimit is greater than the labelValueLengthLimit, the labelValueLengthLimit will be set to enforcedLabelValueLengthLimit. * Scrape objects with a labelValueLengthLimit value less than or equal to enforcedLabelValueLengthLimit keep their specific value. * Scrape objects with a labelValueLengthLimit value greater than enforcedLabelValueLengthLimit are set to enforcedLabelValueLengthLimit.

enforcedKeepDroppedTargets
uint64
(Optional)

enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory. The value overrides any spec.keepDroppedTargets set by ServiceMonitor, PodMonitor, Probe objects unless spec.keepDroppedTargets is greater than zero and less than spec.enforcedKeepDroppedTargets.

It requires Prometheus >= v2.47.0.

When both enforcedKeepDroppedTargets and keepDroppedTargets are defined and greater than zero, the following rules apply: * Scrape objects without a defined keepDroppedTargets value will inherit the global keepDroppedTargets value (Prometheus >= 2.45.0) or the enforcedKeepDroppedTargets value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedKeepDroppedTargets is greater than the keepDroppedTargets, the keepDroppedTargets will be set to enforcedKeepDroppedTargets. * Scrape objects with a keepDroppedTargets value less than or equal to enforcedKeepDroppedTargets keep their specific value. * Scrape objects with a keepDroppedTargets value greater than enforcedKeepDroppedTargets are set to enforcedKeepDroppedTargets.

enforcedBodySizeLimit
ByteSize
(Optional)

enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus. Targets responding with a body larger than this many bytes will cause the scrape to fail.

It requires Prometheus >= v2.28.0.

When both enforcedBodySizeLimit and bodySizeLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined bodySizeLimit value will inherit the global bodySizeLimit value (Prometheus >= 2.45.0) or the enforcedBodySizeLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedBodySizeLimit is greater than the bodySizeLimit, the bodySizeLimit will be set to enforcedBodySizeLimit. * Scrape objects with a bodySizeLimit value less than or equal to enforcedBodySizeLimit keep their specific value. * Scrape objects with a bodySizeLimit value greater than enforcedBodySizeLimit are set to enforcedBodySizeLimit.

nameValidationScheme
NameValidationSchemeOptions
(Optional)

nameValidationScheme defines the validation scheme for metric and label names.

It requires Prometheus >= v2.55.0.

nameEscapingScheme
NameEscapingSchemeOptions
(Optional)

nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.

It requires Prometheus >= v3.4.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.

It requires Prometheus >= v3.4.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

It requires Prometheus >= v3.5.0.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created Pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

hostAliases
[]HostAlias
(Optional)

hostAliases defines the optional list of hosts and IPs that will be injected into the Pod’s hosts file if specified.

additionalArgs
[]Argument
(Optional)

additionalArgs allows setting additional arguments for the ‘prometheus’ container.

It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the Prometheus container which may cause issues if they are invalid or not supported by the given Prometheus version.

In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged.

walCompression
bool
(Optional)

walCompression defines the compression of the write-ahead log (WAL) using Snappy.

WAL compression is enabled by default for Prometheus >= 2.20.0

Requires Prometheus v2.11.0 and above.

excludedFromEnforcement
[]ObjectReference
(Optional)

excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.

It is only applicable if spec.enforcedNamespaceLabel set to true.

hostNetwork
bool
(Optional)

hostNetwork defines the host’s network namespace if true.

Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/ ).

When hostNetwork is enabled, this will set the DNS policy to ClusterFirstWithHostNet automatically (unless .spec.DNSPolicy is set to a different value).

podTargetLabels
[]string
(Optional)

podTargetLabels are appended to the spec.podTargetLabels field of all PodMonitor and ServiceMonitor objects.

tracingConfig
PrometheusTracingConfig
(Optional)

tracingConfig defines tracing in Prometheus.

This is an experimental feature, it may change in any upcoming release in a breaking way.

bodySizeLimit
ByteSize
(Optional)

bodySizeLimit defines per-scrape on response body size. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedBodySizeLimit.

sampleLimit
uint64
(Optional)

sampleLimit defines per-scrape limit on number of scraped samples that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedSampleLimit.

targetLimit
uint64
(Optional)

targetLimit defines a limit on the number of scraped targets that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedTargetLimit.

labelLimit
uint64
(Optional)

labelLimit defines per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelLimit.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelNameLengthLimit.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelValueLengthLimit.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedKeepDroppedTargets.

reloadStrategy
ReloadStrategyType
(Optional)

reloadStrategy defines the strategy used to reload the Prometheus configuration. If not specified, the configuration is reloaded using the /-/reload HTTP endpoint.

maximumStartupDurationSeconds
int32
(Optional)

maximumStartupDurationSeconds defines the maximum time that the prometheus container’s startup probe will wait before being considered failed. The startup probe will return 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 minutes).

scrapeClasses
[]ScrapeClass
(Optional)

scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.

This is an experimental feature, it may change in any upcoming release in a breaking way.

serviceDiscoveryRole
ServiceDiscoveryRole
(Optional)

serviceDiscoveryRole defines the service discovery role used to discover targets from ServiceMonitor objects and Alertmanager endpoints.

If set, the value should be either “Endpoints” or “EndpointSlice”. If unset, the operator assumes the “Endpoints” role.

tsdb
TSDBSpec
(Optional)

tsdb defines the runtime reloadable configuration of the timeseries database(TSDB). It requires Prometheus >= v2.39.0 or PrometheusAgent >= v2.54.0.

scrapeFailureLogFile
string
(Optional)

scrapeFailureLogFile defines the file to which scrape failures are logged. Reloading the configuration will reopen the file.

If the filename has an empty path, e.g. ‘file.log’, The Prometheus Pods will mount the file into an emptyDir volume at /var/log/prometheus. If a full path is provided, e.g. ‘/var/log/prometheus/file.log’, you must mount a volume in the specified directory and it must be writable. It requires Prometheus >= v2.55.0.

serviceName
string
(Optional)

serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the Prometheus/PrometheusAgent resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named prometheus-operated for Prometheus resources, or prometheus-agent-operated for PrometheusAgent resources. When deploying multiple Prometheus/PrometheusAgent resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

runtime
RuntimeConfig
(Optional)

runtime defines the values for the Prometheus process behavior

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 600 seconds.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

Condition

(Appears on:AlertmanagerStatus, PrometheusStatus, ThanosRulerStatus)

Condition represents the state of the resources associated with the Prometheus, Alertmanager or ThanosRuler resource.

Field Description
type
ConditionType

type of the condition being reported.

status
ConditionStatus

status of the condition.

lastTransitionTime
Kubernetes meta/v1.Time

lastTransitionTime is the time of the last update to the current status property.

reason
string
(Optional)

reason for the condition’s last transition.

message
string
(Optional)

message defines human-readable message indicating details for the condition’s last transition.

observedGeneration
int64
(Optional)

observedGeneration defines the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.

ConditionStatus (string alias)

(Appears on:Condition, ConfigResourceCondition)

Value Description

"Degraded"

"False"

"True"

"Unknown"

ConditionType (string alias)

(Appears on:Condition, ConfigResourceCondition)

Value Description

"Accepted"

Accepted indicates whether the workload controller has successfully accepted the configuration resource and updated the configuration of the workload accordingly. The possible status values for this condition type are: - True: the configuration resource was successfully accepted by the controller and written to the configuration secret. - False: the controller rejected the configuration due to an error. - Unknown: the operator couldn’t determine the condition status.

"Available"

Available indicates whether enough pods are ready to provide the service. The possible status values for this condition type are: - True: all pods are running and ready, the service is fully available. - Degraded: some pods aren’t ready, the service is partially available. - False: no pods are running, the service is totally unavailable. - Unknown: the operator couldn’t determine the condition status.

"Reconciled"

Reconciled indicates whether the operator has reconciled the state of the underlying resources with the object’s spec. The possible status values for this condition type are: - True: the reconciliation was successful. - False: the reconciliation failed. - Unknown: the operator couldn’t determine the condition status.

ConfigResourceCondition

(Appears on:WorkloadBinding)

ConfigResourceCondition describes the status of configuration resources linked to Prometheus, PrometheusAgent, Alertmanager, or ThanosRuler.

Field Description
type
ConditionType

type of the condition being reported. Currently, only “Accepted” is supported.

status
ConditionStatus

status of the condition.

lastTransitionTime
Kubernetes meta/v1.Time

lastTransitionTime defines the time of the last update to the current status property.

reason
string
(Optional)

reason for the condition’s last transition.

message
string
(Optional)

message defines the human-readable message indicating details for the condition’s last transition.

observedGeneration
int64
(Optional)

observedGeneration defines the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[].observedGeneration is 9, the condition is out of date with respect to the current state of the object.

ConfigResourceStatus

(Appears on:PodMonitor, Probe, ServiceMonitor)

ConfigResourceStatus is the most recent observed status of the Configuration Resource (ServiceMonitor, PodMonitor and Probes). Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Field Description
bindings
[]WorkloadBinding
(Optional)

bindings defines the list of workload resources (Prometheus or PrometheusAgent) which select the configuration resource.

CoreV1TopologySpreadConstraint

(Appears on:TopologySpreadConstraint)

Field Description
maxSkew
int32

MaxSkew describes the degree to which pods may be unevenly distributed. When whenUnsatisfiable=DoNotSchedule, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When whenUnsatisfiable=ScheduleAnyway, it is used to give higher precedence to topologies that satisfy it. It’s a required field. Default value is 1 and 0 is not allowed.

topologyKey
string

TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a “bucket”, and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is “kubernetes.io/hostname”, each Node is a domain of that topology. And, if TopologyKey is “topology.kubernetes.io/zone”, each zone is a domain of that topology. It’s a required field.

whenUnsatisfiable
Kubernetes core/v1.UnsatisfiableConstraintAction

WhenUnsatisfiable indicates how to deal with a pod if it doesn’t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered “Unsatisfiable” for an incoming pod if and only if every possible node assignment for that pod would violate “MaxSkew” on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won’t make it more imbalanced. It’s a required field.

labelSelector
Kubernetes meta/v1.LabelSelector
(Optional)

LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.

minDomains
int32
(Optional)

MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats “global minimum” as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won’t schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.

For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so “global minimum” is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew.

nodeAffinityPolicy
Kubernetes core/v1.NodeInclusionPolicy
(Optional)

NodeAffinityPolicy indicates how we will treat Pod’s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.

If this value is nil, the behavior is equivalent to the Honor policy.

nodeTaintsPolicy
Kubernetes core/v1.NodeInclusionPolicy
(Optional)

NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.

If this value is nil, the behavior is equivalent to the Ignore policy.

matchLabelKeys
[]string
(Optional)

MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn’t set. Keys that don’t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.

This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).

DNSPolicy (string alias)

(Appears on:AlertmanagerSpec, CommonPrometheusFields, ThanosRulerSpec)

DNSPolicy specifies the DNS policy for the pod.

Value Description

"ClusterFirst"

DNSClusterFirst defines that the pod should use cluster DNS first unless hostNetwork is true, if it is available, then fall back on the default (as determined by kubelet) DNS settings.

"ClusterFirstWithHostNet"

DNSClusterFirstWithHostNet defines that the pod should use cluster DNS first, if it is available, then fall back on the default (as determined by kubelet) DNS settings.

"Default"

DNSDefault defines that the pod should use the default (as determined by kubelet) DNS settings.

"None"

DNSNone defines that the pod should use empty DNS settings. DNS parameters such as nameservers and search paths should be defined via DNSConfig.

Duration (string alias)

(Appears on:AlertmanagerEndpoints, AlertmanagerGlobalConfig, CommonPrometheusFields, Endpoint, MetadataConfig, PodMetricsEndpoint, ProbeSpec, PrometheusSpec, PrometheusTracingConfig, QuerySpec, QueueConfig, RemoteReadSpec, RemoteWriteSpec, RetainConfig, Rule, RuleGroup, TSDBSpec, ThanosRulerSpec, ThanosSpec, AzureSDConfig, ConsulSDConfig, DNSSDConfig, DigitalOceanSDConfig, DockerSDConfig, DockerSwarmSDConfig, EC2SDConfig, EurekaSDConfig, FileSDConfig, GCESDConfig, HTTPSDConfig, HetznerSDConfig, IonosSDConfig, KumaSDConfig, LightSailSDConfig, LinodeSDConfig, NomadSDConfig, OVHCloudSDConfig, OpenStackSDConfig, PuppetDBSDConfig, PushoverConfig, ScalewaySDConfig, ScrapeConfigSpec, WebhookConfig, PushoverConfig, WebhookConfig)

Duration is a valid time duration that can be parsed by Prometheus model.ParseDuration() function. Supported units: y, w, d, h, m, s, ms Examples: 30s, 1m, 1h20m15s, 15d

EmbeddedObjectMetadata

(Appears on:AlertmanagerSpec, CommonPrometheusFields, EmbeddedPersistentVolumeClaim, ThanosRulerSpec)

EmbeddedObjectMetadata contains a subset of the fields included in k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta Only fields which are relevant to embedded resources are included.

Field Description
name
string
(Optional)

name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/

labels
map[string]string
(Optional)

labels define the map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

annotations
map[string]string
(Optional)

annotations defines an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/

EmbeddedPersistentVolumeClaim

(Appears on:StorageSpec)

EmbeddedPersistentVolumeClaim is an embedded version of k8s.io/api/core/v1.PersistentVolumeClaim. It contains TypeMeta and a reduced ObjectMeta.

Field Description
metadata
EmbeddedObjectMetadata
(Optional)

metadata defines EmbeddedMetadata contains metadata relevant to an EmbeddedResource.

spec
Kubernetes core/v1.PersistentVolumeClaimSpec
(Optional)

spec defines the specification of the characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims



accessModes
[]Kubernetes core/v1.PersistentVolumeAccessMode
(Optional)

accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1

selector
Kubernetes meta/v1.LabelSelector
(Optional)

selector is a label query over volumes to consider for binding.

resources
Kubernetes core/v1.VolumeResourceRequirements
(Optional)

resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

volumeName
string
(Optional)

volumeName is the binding reference to the PersistentVolume backing this claim.

storageClassName
string
(Optional)

storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1

volumeMode
Kubernetes core/v1.PersistentVolumeMode
(Optional)

volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.

dataSource
Kubernetes core/v1.TypedLocalObjectReference
(Optional)

dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.

dataSourceRef
Kubernetes core/v1.TypedObjectReference
(Optional)

dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn’t specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn’t set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.

volumeAttributesClassName
string
(Optional)

volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string or nil value indicates that no VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, this field can be reset to its previous value (including nil) to cancel the modification. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/

status
Kubernetes core/v1.PersistentVolumeClaimStatus
(Optional)

status is deprecated: this field is never set.

EnableFeature (string alias)

(Appears on:CommonPrometheusFields, ThanosRulerSpec)

Endpoint

(Appears on:ServiceMonitorSpec)

Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.

Field Description
port
string
(Optional)

port defines the name of the Service port which this endpoint refers to.

It takes precedence over targetPort.

targetPort
k8s.io/apimachinery/pkg/util/intstr.IntOrString
(Optional)

targetPort defines the 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.

path
string
(Optional)

path defines the HTTP path from which to scrape for metrics.

If empty, Prometheus uses the default value (e.g. /metrics).

scheme
string
(Optional)

scheme defines the 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.

params
map[string][]string
(Optional)

params define optional HTTP URL parameters.

interval
Duration
(Optional)

interval at which Prometheus scrapes the metrics from the target.

If empty, Prometheus uses the global scrape interval.

scrapeTimeout
Duration
(Optional)

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.

tlsConfig
TLSConfig
(Optional)

tlsConfig defines the TLS configuration to use when scraping the target.

bearerTokenFile
string
(Optional)

bearerTokenFile defines the file to read bearer token for scraping the target.

Deprecated: use authorization instead.

bearerTokenSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

bearerTokenSecret defines 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.

authorization
SafeAuthorization
(Optional)

authorization configures the Authorization header credentials to use when scraping the target.

Cannot be set at the same time as basicAuth, or oauth2.

honorLabels
bool
(Optional)

honorLabels defines when true the metric’s labels when they collide with the target’s labels.

honorTimestamps
bool
(Optional)

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

trackTimestampsStaleness
bool
(Optional)

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.

basicAuth
BasicAuth
(Optional)

basicAuth defines the Basic Authentication credentials to use when scraping the target.

Cannot be set at the same time as authorization, or oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines 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.

metricRelabelings
[]RelabelConfig
(Optional)

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

relabelings
[]RelabelConfig
(Optional)

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

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether the scrape requests should follow HTTP 3xx redirects.

enableHttp2
bool
(Optional)

enableHttp2 can be used to disable HTTP2 when scraping the target.

filterRunning
bool
(Optional)

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

Exemplars

(Appears on:PrometheusSpec)

Field Description
maxSize
int64
(Optional)

maxSize defines the maximum number of exemplars stored in memory for all series.

exemplar-storage itself must be enabled using the spec.enableFeature option for exemplars to be scraped in the first place.

If not set, Prometheus uses its default value. A value of zero or less than zero disables the storage.

GlobalJiraConfig

(Appears on:AlertmanagerGlobalConfig)

GlobalJiraConfig configures global Jira parameters.

Field Description
apiURL
URL
(Optional)

apiURL defines the default Jira API URL.

It requires Alertmanager >= v0.28.0.

GlobalRocketChatConfig

(Appears on:AlertmanagerGlobalConfig)

GlobalRocketChatConfig configures global Rocket Chat parameters.

Field Description
apiURL
URL
(Optional)

apiURL defines the default Rocket Chat API URL.

It requires Alertmanager >= v0.28.0.

token
Kubernetes core/v1.SecretKeySelector
(Optional)

token defines the default Rocket Chat token.

It requires Alertmanager >= v0.28.0.

tokenID
Kubernetes core/v1.SecretKeySelector
(Optional)

tokenID defines the default Rocket Chat Token ID.

It requires Alertmanager >= v0.28.0.

GlobalSMTPConfig

(Appears on:AlertmanagerGlobalConfig)

GlobalSMTPConfig configures global SMTP parameters. See https://prometheus.io/docs/alerting/latest/configuration/#configuration-file

Field Description
from
string
(Optional)

from defines the default SMTP From header field.

smartHost
HostPort
(Optional)

smartHost defines the default SMTP smarthost used for sending emails.

hello
string
(Optional)

hello defines the default hostname to identify to the SMTP server.

authUsername
string
(Optional)

authUsername represents SMTP Auth using CRAM-MD5, LOGIN and PLAIN. If empty, Alertmanager doesn’t authenticate to the SMTP server.

authPassword
Kubernetes core/v1.SecretKeySelector
(Optional)

authPassword represents SMTP Auth using LOGIN and PLAIN.

authIdentity
string
(Optional)

authIdentity represents SMTP Auth using PLAIN

authSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

authSecret represents SMTP Auth using CRAM-MD5.

requireTLS
bool
(Optional)

requireTLS defines the default SMTP TLS requirement. Note that Go does not support unencrypted connections to remote SMTP endpoints.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the default TLS configuration for SMTP receivers

GlobalTelegramConfig

(Appears on:AlertmanagerGlobalConfig)

GlobalTelegramConfig configures global Telegram parameters.

Field Description
apiURL
URL
(Optional)

apiURL defines he default Telegram API URL.

It requires Alertmanager >= v0.24.0.

GlobalVictorOpsConfig

(Appears on:AlertmanagerGlobalConfig)

GlobalVictorOpsConfig configures global VictorOps parameters.

Field Description
apiURL
URL
(Optional)

apiURL defines the default VictorOps API URL.

apiKey
Kubernetes core/v1.SecretKeySelector
(Optional)

apiKey defines the default VictorOps API Key.

GlobalWeChatConfig

(Appears on:AlertmanagerGlobalConfig)

Field Description
apiURL
URL
(Optional)

apiURL defines he default WeChat API URL. The default value is “https://qyapi.weixin.qq.com/cgi-bin/”

apiSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

apiSecret defines the default WeChat API Secret.

apiCorpID
string
(Optional)

apiCorpID defines the default WeChat API Corporate ID.

GlobalWebexConfig

(Appears on:AlertmanagerGlobalConfig)

GlobalWebexConfig configures global Webex parameters. See https://prometheus.io/docs/alerting/latest/configuration/#configuration-file

Field Description
apiURL
URL
(Optional)

apiURL defines the is the default Webex API URL.

It requires Alertmanager >= v0.25.0.

GoDuration (string alias)

(Appears on:AlertmanagerSpec)

GoDuration is a valid time duration that can be parsed by Go’s time.ParseDuration() function. Supported units: h, m, s, ms Examples: 45ms, 30s, 1m, 1h20m15s

HTTPConfig

(Appears on:AlertmanagerGlobalConfig)

HTTPConfig defines a client HTTP configuration. See https://prometheus.io/docs/alerting/latest/configuration/#http_config

Field Description
authorization
SafeAuthorization
(Optional)

authorization defines the header configuration for the client. This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+.

basicAuth
BasicAuth
(Optional)

basicAuth defines basicAuth for the client. This is mutually exclusive with Authorization. If both are defined, BasicAuth takes precedence.

oauth2
OAuth2
(Optional)

oauth2 defines the client credentials used to fetch a token for the targets.

bearerTokenSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

bearerTokenSecret defines the secret’s key that contains the bearer token to be used by the client for authentication. The secret needs to be in the same namespace as the Alertmanager object and accessible by the Prometheus Operator.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLSConfig for the client.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

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

HostAlias

(Appears on:AlertmanagerSpec, CommonPrometheusFields, ThanosRulerSpec)

HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.

Field Description
ip
string

ip defines the IP address of the host file entry.

hostnames
[]string

hostnames defines hostnames for the above IP address.

HostPort

(Appears on:GlobalSMTPConfig)

HostPort represents a “host:port” network address.

Field Description
host
string

host defines the host’s address, it can be a DNS name or a literal IP address.

port
string

port defines the host’s port, it can be a literal port number or a port name.

LabelName (string alias)

(Appears on:RelabelConfig)

LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores.

ManagedIdentity

(Appears on:AzureAD)

ManagedIdentity defines the Azure User-assigned Managed identity.

Field Description
clientId
string

clientId defines defines the Azure User-assigned Managed identity.

MetadataConfig

(Appears on:RemoteWriteSpec)

MetadataConfig configures the sending of series metadata to the remote storage.

Field Description
send
bool
(Optional)

send defines whether metric metadata is sent to the remote storage or not.

sendInterval
Duration
(Optional)

sendInterval defines how frequently metric metadata is sent to the remote storage.

maxSamplesPerSend
int32
(Optional)

maxSamplesPerSend defines the maximum number of metadata samples per send.

It requires Prometheus >= v2.29.0.

NameEscapingSchemeOptions (string alias)

(Appears on:CommonPrometheusFields, ScrapeConfigSpec)

Specifies the character escaping scheme that will be applied when scraping for metric and label names that do not conform to the legacy Prometheus character set.

Supported values are:

  • AllowUTF8, full UTF-8 support, no escaping needed.
  • Underscores, legacy-invalid characters are escaped to underscores.
  • Dots, dot characters are escaped to _dot_, underscores to __, and all other legacy-invalid characters to underscores.
  • Values, the string is prefixed by U__ and all invalid characters are escaped to their unicode value, surrounded by underscores.
Value Description

"AllowUTF8"

"Dots"

"Underscores"

"Values"

NameValidationSchemeOptions (string alias)

(Appears on:CommonPrometheusFields, ScrapeConfigSpec)

Specifies the validation scheme for metric and label names.

Supported values are: - UTF8NameValidationScheme for UTF-8 support. - LegacyNameValidationScheme for letters, numbers, colons, and underscores.

Note that LegacyNameValidationScheme cannot be used along with the OpenTelemetry NoUTF8EscapingWithSuffixes translation strategy (if enabled).

Value Description

"Legacy"

"UTF8"

NamespaceSelector

(Appears on:PodMonitorSpec, ProbeTargetIngress, ServiceMonitorSpec)

NamespaceSelector is a selector for selecting either all namespaces or a list of namespaces. If any is true, it takes precedence over matchNames. If matchNames is empty and any is false, it means that the objects are selected from the current namespace.

Field Description
any
bool
(Optional)

any defines the boolean describing whether all namespaces are selected in contrast to a list restricting them.

matchNames
[]string
(Optional)

matchNames defines the list of namespace names to select from.

NativeHistogramConfig

(Appears on:PodMonitorSpec, ProbeSpec, ServiceMonitorSpec, ScrapeConfigSpec)

NativeHistogramConfig extends the native histogram configuration settings.

Field Description
scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

NonEmptyDuration (string alias)

(Appears on:Rule)

NonEmptyDuration is a valid time duration that can be parsed by Prometheus model.ParseDuration() function. Compared to Duration, NonEmptyDuration enforces a minimum length of 1. Supported units: y, w, d, h, m, s, ms Examples: 30s, 1m, 1h20m15s, 15d

OAuth2

(Appears on:Endpoint, HTTPConfig, PodMetricsEndpoint, ProbeSpec, RemoteReadSpec, RemoteWriteSpec, AzureSDConfig, ConsulSDConfig, DigitalOceanSDConfig, DockerSDConfig, DockerSwarmSDConfig, EurekaSDConfig, HTTPConfig, HTTPSDConfig, HetznerSDConfig, IonosSDConfig, KubernetesSDConfig, KumaSDConfig, LightSailSDConfig, LinodeSDConfig, NomadSDConfig, PuppetDBSDConfig, ScrapeConfigSpec, HTTPConfig)

OAuth2 configures OAuth2 settings.

Field Description
clientId
SecretOrConfigMap

clientId defines a key of a Secret or ConfigMap containing the OAuth2 client’s ID.

clientSecret
Kubernetes core/v1.SecretKeySelector

clientSecret defines a key of a Secret containing the OAuth2 client’s secret.

tokenUrl
string

tokenUrl defines the URL to fetch the token from.

scopes
[]string

scopes defines the OAuth2 scopes used for the token request.

endpointParams
map[string]string
(Optional)

endpointParams configures the HTTP parameters to append to the token URL.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to use when connecting to the OAuth2 server. It requires Prometheus >= v2.43.0.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

OTLPConfig

(Appears on:CommonPrometheusFields)

OTLPConfig is the configuration for writing to the OTLP endpoint.

Field Description
promoteAllResourceAttributes
bool
(Optional)

promoteAllResourceAttributes promotes all resource attributes to metric labels except the ones defined in ignoreResourceAttributes.

Cannot be true when promoteResourceAttributes is defined. It requires Prometheus >= v3.5.0.

ignoreResourceAttributes
[]string
(Optional)

ignoreResourceAttributes defines the list of OpenTelemetry resource attributes to ignore when promoteAllResourceAttributes is true.

It requires promoteAllResourceAttributes to be true. It requires Prometheus >= v3.5.0.

promoteResourceAttributes
[]string
(Optional)

promoteResourceAttributes defines the list of OpenTelemetry Attributes that should be promoted to metric labels, defaults to none. Cannot be defined when promoteAllResourceAttributes is true.

translationStrategy
TranslationStrategyOption
(Optional)

translationStrategy defines how the OTLP receiver endpoint translates the incoming metrics.

It requires Prometheus >= v3.0.0.

keepIdentifyingResourceAttributes
bool
(Optional)

keepIdentifyingResourceAttributes enables adding service.name, service.namespace and service.instance.id resource attributes to the target_info metric, on top of converting them into the instance and job labels.

It requires Prometheus >= v3.1.0.

convertHistogramsToNHCB
bool
(Optional)

convertHistogramsToNHCB defines optional translation of OTLP explicit bucket histograms into native histograms with custom buckets. It requires Prometheus >= v3.4.0.

ObjectReference

(Appears on:CommonPrometheusFields, ThanosRulerSpec)

ObjectReference references a PodMonitor, ServiceMonitor, Probe or PrometheusRule object.

Field Description
group
string
(Optional)

group of the referent. When not specified, it defaults to monitoring.coreos.com

resource
string

resource of the referent.

namespace
string

namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

name
string
(Optional)

name of the referent. When not set, all resources in the namespace are matched.

PodDNSConfig

(Appears on:AlertmanagerSpec, CommonPrometheusFields, ThanosRulerSpec)

PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.

Field Description
nameservers
[]string
(Optional)

nameservers defines the list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy.

searches
[]string
(Optional)

searches defines the list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy.

options
[]PodDNSConfigOption
(Optional)

options defines the list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Resolution options given in Options will override those that appear in the base DNSPolicy.

PodDNSConfigOption

(Appears on:PodDNSConfig)

PodDNSConfigOption defines DNS resolver options of a pod.

Field Description
name
string

name is required and must be unique.

value
string
(Optional)

value is optional.

PodMetricsEndpoint

(Appears on:PodMonitorSpec)

PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.

Field Description
port
string
(Optional)

port defines the Pod port name which exposes the endpoint.

It takes precedence over the portNumber and targetPort fields.

portNumber
int32
(Optional)

portNumber defines the Pod port number which exposes the endpoint.

targetPort
k8s.io/apimachinery/pkg/util/intstr.IntOrString
(Optional)

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.

path
string
(Optional)

path defines the HTTP path from which to scrape for metrics.

If empty, Prometheus uses the default value (e.g. /metrics).

scheme
string
(Optional)

scheme defines the 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.

params
map[string][]string
(Optional)

params define optional HTTP URL parameters.

interval
Duration
(Optional)

interval at which Prometheus scrapes the metrics from the target.

If empty, Prometheus uses the global scrape interval.

scrapeTimeout
Duration
(Optional)

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.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to use when scraping the target.

bearerTokenSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

bearerTokenSecret defines 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.

honorLabels
bool
(Optional)

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

honorTimestamps
bool
(Optional)

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

trackTimestampsStaleness
bool
(Optional)

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.

basicAuth
BasicAuth
(Optional)

basicAuth defines the Basic Authentication credentials to use when scraping the target.

Cannot be set at the same time as authorization, or oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines 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.

authorization
SafeAuthorization
(Optional)

authorization defines the Authorization header credentials to use when scraping the target.

Cannot be set at the same time as basicAuth, or oauth2.

metricRelabelings
[]RelabelConfig
(Optional)

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

relabelings
[]RelabelConfig
(Optional)

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

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether the scrape requests should follow HTTP 3xx redirects.

enableHttp2
bool
(Optional)

enableHttp2 can be used to disable HTTP2 when scraping the target.

filterRunning
bool
(Optional)

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

PodMonitorSpec

(Appears on:PodMonitor)

PodMonitorSpec contains specification parameters for a PodMonitor.

Field Description
jobLabel
string
(Optional)

jobLabel defines 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>).

podTargetLabels
[]string
(Optional)

podTargetLabels defines the labels which are transferred from the associated Kubernetes Pod object onto the ingested metrics.

podMetricsEndpoints
[]PodMetricsEndpoint
(Optional)

podMetricsEndpoints defines how to scrape metrics from the selected pods.

selector
Kubernetes meta/v1.LabelSelector

selector defines the label selector to select the Kubernetes Pod objects to scrape metrics from.

selectorMechanism
SelectorMechanism
(Optional)

selectorMechanism defines the mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated.

It requires Prometheus >= v2.17.0.

namespaceSelector
NamespaceSelector
(Optional)

namespaceSelector defines in which namespace(s) Prometheus should discover the pods. By default, the pods are discovered in the same namespace as the PodMonitor object but it is possible to select pods across different/all namespaces.

sampleLimit
uint64
(Optional)

sampleLimit defines a per-scrape limit on the number of scraped samples that will be accepted.

targetLimit
uint64
(Optional)

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

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.

It requires Prometheus >= v3.0.0.

labelLimit
uint64
(Optional)

labelLimit defines the per-scrape limit on number of labels that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

attachMetadata
AttachMetadata
(Optional)

attachMetadata defines additional metadata which is added to the discovered targets.

It requires Prometheus >= v2.35.0.

scrapeClass
string
(Optional)

scrapeClass defines the scrape class to apply.

bodySizeLimit
ByteSize
(Optional)

bodySizeLimit when defined specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus.

It requires Prometheus >= v2.28.0.

ProbeParam

(Appears on:ProbeSpec)

ProbeParam defines specification of extra parameters for a Probe.

Field Description
name
string

name defines the parameter name

values
[]string
(Optional)

values defines the parameter values

ProbeSpec

(Appears on:Probe)

ProbeSpec contains specification parameters for a Probe.

Field Description
jobName
string
(Optional)

jobName assigned to scraped metrics by default.

prober
ProberSpec
(Optional)

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

module
string
(Optional)

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

targets
ProbeTargets
(Optional)

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

interval
Duration
(Optional)

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

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the timeout for scraping metrics from the Prometheus exporter. If not specified, the Prometheus global scrape timeout is used. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to use when scraping the endpoint.

bearerTokenSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

bearerTokenSecret defines the 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.

basicAuth
BasicAuth
(Optional)

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

oauth2
OAuth2
(Optional)

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

metricRelabelings
[]RelabelConfig
(Optional)

metricRelabelings defines the RelabelConfig to apply to samples before ingestion.

authorization
SafeAuthorization
(Optional)

authorization section for this endpoint

sampleLimit
uint64
(Optional)

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

targetLimit
uint64
(Optional)

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

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.

It requires Prometheus >= v3.0.0.

labelLimit
uint64
(Optional)

labelLimit defines the 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
uint64
(Optional)

labelNameLengthLimit defines the 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
uint64
(Optional)

labelValueLengthLimit defines the 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.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

scrapeClass
string
(Optional)

scrapeClass defines the scrape class to apply.

params
[]ProbeParam
(Optional)

params defines the list of HTTP query parameters for the scrape. Please note that the .spec.module field takes precedence over the module parameter from this list when both are defined. The module name must be added using Module under ProbeSpec.

ProbeTargetIngress

(Appears on:ProbeTargets)

ProbeTargetIngress defines the set of Ingress objects considered for probing. The operator configures a target for each host/path combination of each ingress object.

Field Description
selector
Kubernetes meta/v1.LabelSelector
(Optional)

selector to select the Ingress objects.

namespaceSelector
NamespaceSelector
(Optional)

namespaceSelector defines from which namespaces to select Ingress objects.

relabelingConfigs
[]RelabelConfig
(Optional)

relabelingConfigs 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

ProbeTargetStaticConfig

(Appears on:ProbeTargets)

ProbeTargetStaticConfig defines the set of static targets considered for probing.

Field Description
static
[]string
(Optional)

static defines the list of hosts to probe.

labels
map[string]string
(Optional)

labels defines all labels assigned to all metrics scraped from the targets.

relabelingConfigs
[]RelabelConfig
(Optional)

relabelingConfigs defines relabelings to be apply to the label set of the targets before it gets scraped. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

ProbeTargets

(Appears on:ProbeSpec)

ProbeTargets defines how to discover the probed targets. One of the staticConfig or ingress must be defined. If both are defined, staticConfig takes precedence.

Field Description
staticConfig
ProbeTargetStaticConfig
(Optional)

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.

ingress
ProbeTargetIngress
(Optional)

ingress defines the Ingress objects to probe and the relabeling configuration. If staticConfig is also defined, staticConfig takes precedence.

ProberSpec

(Appears on:ProbeSpec)

ProberSpec contains specification parameters for the Prober used for probing.

Field Description
url
string

url defines the mandatory URL of the prober.

scheme
string
(Optional)

scheme defines the 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.

path
string
(Optional)

path to collect metrics from. Defaults to /probe.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

PrometheusRuleExcludeConfig

(Appears on:PrometheusSpec, ThanosRulerSpec)

PrometheusRuleExcludeConfig enables users to configure excluded PrometheusRule names and their namespaces to be ignored while enforcing namespace label for alerts and metrics.

Field Description
ruleNamespace
string

ruleNamespace defines the namespace of the excluded PrometheusRule object.

ruleName
string

ruleName defines the name of the excluded PrometheusRule object.

PrometheusRuleSpec

(Appears on:PrometheusRule)

PrometheusRuleSpec contains specification parameters for a Rule.

Field Description
groups
[]RuleGroup
(Optional)

groups defines the content of Prometheus rule file

PrometheusSpec

(Appears on:Prometheus)

PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Field Description
podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the Prometheus pods.

The following items are reserved and cannot be overridden: * “prometheus” label, set to the name of the Prometheus object. * “app.kubernetes.io/instance” label, set to the name of the Prometheus object. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/name” label, set to “prometheus”. * “app.kubernetes.io/version” label, set to the Prometheus version. * “operator.prometheus.io/name” label, set to the name of the Prometheus object. * “operator.prometheus.io/shard” label, set to the shard number of the Prometheus object. * “kubectl.kubernetes.io/default-container” annotation, set to “prometheus”.

serviceMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorSelector defines the serviceMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

serviceMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorNamespaceSelector defines the namespaces to match for ServicedMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

podMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorSelector defines the podMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

podMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorNamespaceSelector defines the namespaces to match for PodMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

probeSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeSelector defines the probes to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

probeNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeNamespaceSelector defines the namespaces to match for Probe discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

scrapeConfigSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigSelector defines the scrapeConfigs to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

scrapeConfigNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigNamespaceSelector defines the namespaces to match for ScrapeConfig discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

version
string
(Optional)

version of Prometheus being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.

If not specified, the operator assumes the latest upstream version of Prometheus available at the time when the version of the operator was released.

paused
bool
(Optional)

paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.

image
string
(Optional)

image defines the container image name for Prometheus. If specified, it takes precedence over the spec.baseImage, spec.tag and spec.sha fields.

Specifying spec.version is still necessary to ensure the Prometheus Operator knows which version of Prometheus is being configured.

If neither spec.image nor spec.baseImage are defined, the operator will use the latest upstream version of Prometheus available at the time when the operator was released.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy defines the image pull policy for the ‘prometheus’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

replicas
int32
(Optional)

replicas defines the number of replicas of each shard to deploy for a Prometheus deployment. spec.replicas multiplied by spec.shards is the total number of Pods created.

Default: 1

shards
int32
(Optional)

shards defines the number of shards to distribute the scraped targets onto.

spec.replicas multiplied by spec.shards is the total number of Pods being created.

When not defined, the operator assumes only one shard.

Note that scaling down shards will not reshard data onto the remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally, use either * Thanos sidecar + querier for query federation and Thanos Ruler for rules. * Remote-write to send metrics to a central location.

By default, the sharding of targets is performed on: * The __address__ target’s metadata label for PodMonitor, ServiceMonitor and ScrapeConfig resources. * The __param_target__ label for Probe resources.

Users can define their own sharding implementation by setting the __tmp_hash label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class).

You can also disable sharding on a specific target by setting the __tmp_disable_sharding label with relabeling configuration. When the label value isn’t empty, all Prometheus shards will scrape the target.

replicaExternalLabelName
string
(Optional)

replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus_replica”

prometheusExternalLabelName
string
(Optional)

prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus”

logLevel
string
(Optional)

logLevel for Prometheus and the config-reloader sidecar.

logFormat
string
(Optional)

logFormat for Log level for Prometheus and the config-reloader sidecar.

scrapeInterval
Duration
(Optional)

scrapeInterval defines interval between consecutive scrapes.

Default: “30s”

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

PrometheusText1.0.0 requires Prometheus >= v3.0.0.

externalLabels
map[string]string
(Optional)

externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). Labels defined by spec.replicaExternalLabelName and spec.prometheusExternalLabelName take precedence over this list.

enableRemoteWriteReceiver
bool
(Optional)

enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.

WARNING: This is not considered an efficient way of ingesting samples. Use it with caution for specific low-volume use cases. It is not suitable for replacing the ingestion via scraping and turning Prometheus into a push-based metrics collection system. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver

It requires Prometheus >= v2.33.0.

enableOTLPReceiver
bool
(Optional)

enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.

Note that the OTLP receiver endpoint is automatically enabled if .spec.otlpConfig is defined.

It requires Prometheus >= v2.47.0.

remoteWriteReceiverMessageVersions
[]RemoteWriteMessageVersion
(Optional)

remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.

It requires Prometheus >= v2.54.0.

enableFeatures
[]EnableFeature
(Optional)

enableFeatures enables access to Prometheus feature flags. By default, no features are enabled.

Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/

externalUrl
string
(Optional)

externalUrl defines the external URL under which the Prometheus service is externally available. This is necessary to generate correct URLs (for instance if Prometheus is accessible behind an Ingress resource).

routePrefix
string
(Optional)

routePrefix defines the route prefix Prometheus registers HTTP handlers for.

This is useful when using spec.externalURL, and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with kubectl proxy.

storage
StorageSpec
(Optional)

storage defines the storage used by Prometheus.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes allows the configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts allows the configuration of additional VolumeMounts.

VolumeMounts will be appended to other VolumeMounts in the ‘prometheus’ container, that are generated as a result of StorageSpec objects.

persistentVolumeClaimRetentionPolicy
Kubernetes apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy
(Optional)

persistentVolumeClaimRetentionPolicy defines the field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is an alpha field from kubernetes 1.23 until 1.26 and a beta field from 1.26. It requires enabling the StatefulSetAutoDeletePVC feature gate.

web
PrometheusWebSpec
(Optional)

web defines the configuration of the Prometheus web server.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resources requests and limits of the ‘prometheus’ container.

nodeSelector
map[string]string
(Optional)

nodeSelector defines on which Nodes the Pods are scheduled.

serviceAccountName
string
(Optional)

serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.

automountServiceAccountToken
bool
(Optional)

automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the field isn’t 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.

secrets
[]string
(Optional)

secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each Secret is added to the StatefulSet definition as a volume named secret-<secret-name>. The Secrets are mounted into /etc/prometheus/secrets/ in the ‘prometheus’ container.

configMaps
[]string
(Optional)

configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each ConfigMap is added to the StatefulSet definition as a volume named configmap-<configmap-name>. The ConfigMaps are mounted into /etc/prometheus/configmaps/ in the ‘prometheus’ container.

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines the Pods’ affinity scheduling rules if specified.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines the Pods’ tolerations if specified.

topologySpreadConstraints
[]TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the pod’s topology spread constraints if specified.

remoteWrite
[]RemoteWriteSpec
(Optional)

remoteWrite defines the list of remote write configurations.

otlp
OTLPConfig
(Optional)

otlp defines the settings related to the OTLP receiver feature. It requires Prometheus >= v2.55.0.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines the DNS configuration for the pods.

listenLocal
bool
(Optional)

listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP’s address.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch.

The names of containers managed by the operator are: * prometheus * config-reloader * thanos-sidecar

Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.

The names of init container name managed by the operator are: * init-config-reloader.

Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

additionalScrapeConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalScrapeConfigs allows specifying a key of a Secret containing additional Prometheus scrape configurations. Scrape configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible scrape configs are going to break Prometheus after the upgrade.

apiserverConfig
APIServerConfig
(Optional)

apiserverConfig allows specifying a host and auth methods to access the Kuberntees API server. If null, Prometheus is assumed to run inside of the cluster: it will discover the API servers automatically and use the Pod’s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.

priorityClassName
string
(Optional)

priorityClassName assigned to the Pods.

portName
string
(Optional)

portName used for the pods and governing service. Default: “web”

arbitraryFSAccessThroughSMs
ArbitraryFSAccessThroughSMsConfig
(Optional)

arbitraryFSAccessThroughSMs when true, ServiceMonitor, PodMonitor and Probe object are forbidden to reference arbitrary files on the file system of the ‘prometheus’ container. When a ServiceMonitor’s endpoint specifies a bearerTokenFile value (e.g. ‘/var/run/secrets/kubernetes.io/serviceaccount/token’), a malicious target can get access to the Prometheus service account’s token in the Prometheus’ scrape request. Setting spec.arbitraryFSAccessThroughSM to ‘true’ would prevent the attack. Users should instead provide the credentials using the spec.bearerTokenSecret field.

overrideHonorLabels
bool
(Optional)

overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped data to “exported_” for all targets created from ServiceMonitor, PodMonitor and ScrapeConfig objects. Otherwise the HonorLabels field of the service or pod monitor applies. In practice,OverrideHonorLabels:true enforces honorLabels:false for all ServiceMonitor, PodMonitor and ScrapeConfig objects.

overrideHonorTimestamps
bool
(Optional)

overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors. Otherwise the HonorTimestamps field of the service or pod monitor applies.

ignoreNamespaceSelectors
bool
(Optional)

ignoreNamespaceSelectors when true, spec.namespaceSelector from all PodMonitor, ServiceMonitor and Probe objects will be ignored. They will only discover targets within the namespace of the PodMonitor, ServiceMonitor and Probe object.

enforcedNamespaceLabel
string
(Optional)

enforcedNamespaceLabel when not empty, a label will be added to:

  1. All metrics scraped from ServiceMonitor, PodMonitor, Probe and ScrapeConfig objects.
  2. All metrics generated from recording rules defined in PrometheusRule objects.
  3. All alerts generated from alerting rules defined in PrometheusRule objects.
  4. All vector selectors of PromQL expressions defined in PrometheusRule objects.

The label will not added for objects referenced in spec.excludedFromEnforcement.

The label’s name is this field’s value. The label’s value is the namespace of the ServiceMonitor, PodMonitor, Probe, PrometheusRule or ScrapeConfig object.

enforcedSampleLimit
uint64
(Optional)

enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted. This overrides any spec.sampleLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.sampleLimit is greater than zero and less than spec.enforcedSampleLimit.

It is meant to be used by admins to keep the overall number of samples/series under a desired limit.

When both enforcedSampleLimit and sampleLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined sampleLimit value will inherit the global sampleLimit value (Prometheus >= 2.45.0) or the enforcedSampleLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedSampleLimit is greater than the sampleLimit, the sampleLimit will be set to enforcedSampleLimit. * Scrape objects with a sampleLimit value less than or equal to enforcedSampleLimit keep their specific value. * Scrape objects with a sampleLimit value greater than enforcedSampleLimit are set to enforcedSampleLimit.

enforcedTargetLimit
uint64
(Optional)

enforcedTargetLimit when defined specifies a global limit on the number of scraped targets. The value overrides any spec.targetLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.targetLimit is greater than zero and less than spec.enforcedTargetLimit.

It is meant to be used by admins to to keep the overall number of targets under a desired limit.

When both enforcedTargetLimit and targetLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined targetLimit value will inherit the global targetLimit value (Prometheus >= 2.45.0) or the enforcedTargetLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedTargetLimit is greater than the targetLimit, the targetLimit will be set to enforcedTargetLimit. * Scrape objects with a targetLimit value less than or equal to enforcedTargetLimit keep their specific value. * Scrape objects with a targetLimit value greater than enforcedTargetLimit are set to enforcedTargetLimit.

enforcedLabelLimit
uint64
(Optional)

enforcedLabelLimit when defined specifies a global limit on the number of labels per sample. The value overrides any spec.labelLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelLimit is greater than zero and less than spec.enforcedLabelLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelLimit and labelLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelLimit value will inherit the global labelLimit value (Prometheus >= 2.45.0) or the enforcedLabelLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelLimit is greater than the labelLimit, the labelLimit will be set to enforcedLabelLimit. * Scrape objects with a labelLimit value less than or equal to enforcedLabelLimit keep their specific value. * Scrape objects with a labelLimit value greater than enforcedLabelLimit are set to enforcedLabelLimit.

enforcedLabelNameLengthLimit
uint64
(Optional)

enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample. The value overrides any spec.labelNameLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelNameLengthLimit is greater than zero and less than spec.enforcedLabelNameLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelNameLengthLimit and labelNameLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelNameLengthLimit value will inherit the global labelNameLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelNameLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelNameLengthLimit is greater than the labelNameLengthLimit, the labelNameLengthLimit will be set to enforcedLabelNameLengthLimit. * Scrape objects with a labelNameLengthLimit value less than or equal to enforcedLabelNameLengthLimit keep their specific value. * Scrape objects with a labelNameLengthLimit value greater than enforcedLabelNameLengthLimit are set to enforcedLabelNameLengthLimit.

enforcedLabelValueLengthLimit
uint64
(Optional)

enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample. The value overrides any spec.labelValueLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelValueLengthLimit is greater than zero and less than spec.enforcedLabelValueLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelValueLengthLimit and labelValueLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelValueLengthLimit value will inherit the global labelValueLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelValueLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelValueLengthLimit is greater than the labelValueLengthLimit, the labelValueLengthLimit will be set to enforcedLabelValueLengthLimit. * Scrape objects with a labelValueLengthLimit value less than or equal to enforcedLabelValueLengthLimit keep their specific value. * Scrape objects with a labelValueLengthLimit value greater than enforcedLabelValueLengthLimit are set to enforcedLabelValueLengthLimit.

enforcedKeepDroppedTargets
uint64
(Optional)

enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory. The value overrides any spec.keepDroppedTargets set by ServiceMonitor, PodMonitor, Probe objects unless spec.keepDroppedTargets is greater than zero and less than spec.enforcedKeepDroppedTargets.

It requires Prometheus >= v2.47.0.

When both enforcedKeepDroppedTargets and keepDroppedTargets are defined and greater than zero, the following rules apply: * Scrape objects without a defined keepDroppedTargets value will inherit the global keepDroppedTargets value (Prometheus >= 2.45.0) or the enforcedKeepDroppedTargets value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedKeepDroppedTargets is greater than the keepDroppedTargets, the keepDroppedTargets will be set to enforcedKeepDroppedTargets. * Scrape objects with a keepDroppedTargets value less than or equal to enforcedKeepDroppedTargets keep their specific value. * Scrape objects with a keepDroppedTargets value greater than enforcedKeepDroppedTargets are set to enforcedKeepDroppedTargets.

enforcedBodySizeLimit
ByteSize
(Optional)

enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus. Targets responding with a body larger than this many bytes will cause the scrape to fail.

It requires Prometheus >= v2.28.0.

When both enforcedBodySizeLimit and bodySizeLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined bodySizeLimit value will inherit the global bodySizeLimit value (Prometheus >= 2.45.0) or the enforcedBodySizeLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedBodySizeLimit is greater than the bodySizeLimit, the bodySizeLimit will be set to enforcedBodySizeLimit. * Scrape objects with a bodySizeLimit value less than or equal to enforcedBodySizeLimit keep their specific value. * Scrape objects with a bodySizeLimit value greater than enforcedBodySizeLimit are set to enforcedBodySizeLimit.

nameValidationScheme
NameValidationSchemeOptions
(Optional)

nameValidationScheme defines the validation scheme for metric and label names.

It requires Prometheus >= v2.55.0.

nameEscapingScheme
NameEscapingSchemeOptions
(Optional)

nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.

It requires Prometheus >= v3.4.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.

It requires Prometheus >= v3.4.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

It requires Prometheus >= v3.5.0.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created Pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

hostAliases
[]HostAlias
(Optional)

hostAliases defines the optional list of hosts and IPs that will be injected into the Pod’s hosts file if specified.

additionalArgs
[]Argument
(Optional)

additionalArgs allows setting additional arguments for the ‘prometheus’ container.

It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the Prometheus container which may cause issues if they are invalid or not supported by the given Prometheus version.

In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged.

walCompression
bool
(Optional)

walCompression defines the compression of the write-ahead log (WAL) using Snappy.

WAL compression is enabled by default for Prometheus >= 2.20.0

Requires Prometheus v2.11.0 and above.

excludedFromEnforcement
[]ObjectReference
(Optional)

excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.

It is only applicable if spec.enforcedNamespaceLabel set to true.

hostNetwork
bool
(Optional)

hostNetwork defines the host’s network namespace if true.

Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/ ).

When hostNetwork is enabled, this will set the DNS policy to ClusterFirstWithHostNet automatically (unless .spec.DNSPolicy is set to a different value).

podTargetLabels
[]string
(Optional)

podTargetLabels are appended to the spec.podTargetLabels field of all PodMonitor and ServiceMonitor objects.

tracingConfig
PrometheusTracingConfig
(Optional)

tracingConfig defines tracing in Prometheus.

This is an experimental feature, it may change in any upcoming release in a breaking way.

bodySizeLimit
ByteSize
(Optional)

bodySizeLimit defines per-scrape on response body size. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedBodySizeLimit.

sampleLimit
uint64
(Optional)

sampleLimit defines per-scrape limit on number of scraped samples that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedSampleLimit.

targetLimit
uint64
(Optional)

targetLimit defines a limit on the number of scraped targets that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedTargetLimit.

labelLimit
uint64
(Optional)

labelLimit defines per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelLimit.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelNameLengthLimit.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelValueLengthLimit.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedKeepDroppedTargets.

reloadStrategy
ReloadStrategyType
(Optional)

reloadStrategy defines the strategy used to reload the Prometheus configuration. If not specified, the configuration is reloaded using the /-/reload HTTP endpoint.

maximumStartupDurationSeconds
int32
(Optional)

maximumStartupDurationSeconds defines the maximum time that the prometheus container’s startup probe will wait before being considered failed. The startup probe will return 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 minutes).

scrapeClasses
[]ScrapeClass
(Optional)

scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.

This is an experimental feature, it may change in any upcoming release in a breaking way.

serviceDiscoveryRole
ServiceDiscoveryRole
(Optional)

serviceDiscoveryRole defines the service discovery role used to discover targets from ServiceMonitor objects and Alertmanager endpoints.

If set, the value should be either “Endpoints” or “EndpointSlice”. If unset, the operator assumes the “Endpoints” role.

tsdb
TSDBSpec
(Optional)

tsdb defines the runtime reloadable configuration of the timeseries database(TSDB). It requires Prometheus >= v2.39.0 or PrometheusAgent >= v2.54.0.

scrapeFailureLogFile
string
(Optional)

scrapeFailureLogFile defines the file to which scrape failures are logged. Reloading the configuration will reopen the file.

If the filename has an empty path, e.g. ‘file.log’, The Prometheus Pods will mount the file into an emptyDir volume at /var/log/prometheus. If a full path is provided, e.g. ‘/var/log/prometheus/file.log’, you must mount a volume in the specified directory and it must be writable. It requires Prometheus >= v2.55.0.

serviceName
string
(Optional)

serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the Prometheus/PrometheusAgent resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named prometheus-operated for Prometheus resources, or prometheus-agent-operated for PrometheusAgent resources. When deploying multiple Prometheus/PrometheusAgent resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

runtime
RuntimeConfig
(Optional)

runtime defines the values for the Prometheus process behavior

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 600 seconds.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

baseImage
string
(Optional)

baseImage is deprecated: use ‘spec.image’ instead.

tag
string
(Optional)

tag is deprecated: use ‘spec.image’ instead. The image’s tag can be specified as part of the image name.

sha
string
(Optional)

sha is deprecated: use ‘spec.image’ instead. The image’s digest can be specified as part of the image name.

retention
Duration
(Optional)

retention defines how long to retain the Prometheus data.

Default: “24h” if spec.retention and spec.retentionSize are empty.

retentionSize
ByteSize
(Optional)

retentionSize defines the maximum number of bytes used by the Prometheus data.

shardRetentionPolicy
ShardRetentionPolicy
(Optional)

shardRetentionPolicy defines the retention policy for the Prometheus shards. (Alpha) Using this field requires the ‘PrometheusShardRetentionPolicy’ feature gate to be enabled.

The final goals for this feature can be seen at https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/proposals/202310-shard-autoscaling.md#graceful-scale-down-of-prometheus-servers, however, the feature is not yet fully implemented in this PR. The limitation being: * Retention duration is not settable, for now, shards are retained forever.

disableCompaction
bool
(Optional)

disableCompaction when true, the Prometheus compaction is disabled. When spec.thanos.objectStorageConfig or spec.objectStorageConfigFile are defined, the operator automatically disables block compaction to avoid race conditions during block uploads (as the Thanos documentation recommends).

rules
Rules
(Optional)

rules defines the configuration of the Prometheus rules’ engine.

prometheusRulesExcludedFromEnforce
[]PrometheusRuleExcludeConfig
(Optional)

prometheusRulesExcludedFromEnforce defines the list of PrometheusRule objects to which the namespace label enforcement doesn’t apply. This is only relevant when spec.enforcedNamespaceLabel is set to true. Deprecated: use spec.excludedFromEnforcement instead.

ruleSelector
Kubernetes meta/v1.LabelSelector
(Optional)

ruleSelector defines the prometheusRule objects to be selected for rule evaluation. An empty label selector matches all objects. A null label selector matches no objects.

ruleNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

ruleNamespaceSelector defines the namespaces to match for PrometheusRule discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

query
QuerySpec
(Optional)

query defines the configuration of the Prometheus query service.

alerting
AlertingSpec
(Optional)

alerting defines the settings related to Alertmanager.

additionalAlertRelabelConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalAlertRelabelConfigs defines a key of a Secret containing additional Prometheus alert relabel configurations. The alert relabel configurations are appended to the configuration generated by the Prometheus Operator. They must be formatted according to the official Prometheus documentation:

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs

The user is responsible for making sure that the configurations are valid

Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible alert relabel configs are going to break Prometheus after the upgrade.

additionalAlertManagerConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalAlertManagerConfigs defines a key of a Secret containing additional Prometheus Alertmanager configurations. The Alertmanager configurations are appended to the configuration generated by the Prometheus Operator. They must be formatted according to the official Prometheus documentation:

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config

The user is responsible for making sure that the configurations are valid

Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible AlertManager configs are going to break Prometheus after the upgrade.

remoteRead
[]RemoteReadSpec
(Optional)

remoteRead defines the list of remote read configurations.

thanos
ThanosSpec
(Optional)

thanos defines the configuration of the optional Thanos sidecar.

queryLogFile
string
(Optional)

queryLogFile specifies where the file to which PromQL queries are logged.

If the filename has an empty path, e.g. ‘query.log’, The Prometheus Pods will mount the file into an emptyDir volume at /var/log/prometheus. If a full path is provided, e.g. ‘/var/log/prometheus/query.log’, you must mount a volume in the specified directory and it must be writable. This is because the prometheus container runs with a read-only root filesystem for security reasons. Alternatively, the location can be set to a standard I/O stream, e.g. /dev/stdout, to log query information to the default Prometheus log stream.

allowOverlappingBlocks
bool
(Optional)

allowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus.

Deprecated: this flag has no effect for Prometheus >= 2.39.0 where overlapping blocks are enabled by default.

exemplars
Exemplars
(Optional)

exemplars related settings that are runtime reloadable. It requires to enable the exemplar-storage feature flag to be effective.

evaluationInterval
Duration
(Optional)

evaluationInterval defines the interval between rule evaluations. Default: “30s”

ruleQueryOffset
Duration
(Optional)

ruleQueryOffset defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past. It requires Prometheus >= v2.53.0.

enableAdminAPI
bool
(Optional)

enableAdminAPI defines access to the Prometheus web admin API.

WARNING: Enabling the admin APIs enables mutating endpoints, to delete data, shutdown Prometheus, and more. Enabling this should be done with care and the user is advised to add additional authentication authorization via a proxy to ensure only clients authorized to perform these actions can do so.

For more information: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis

PrometheusStatus

(Appears on:Prometheus, PrometheusAgent)

PrometheusStatus is the most recent observed status of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Field Description
paused
bool
(Optional)

paused defines whether any actions on the underlying managed objects are being performed. Only delete actions will be performed.

replicas
int32
(Optional)

replicas defines the total number of non-terminated pods targeted by this Prometheus deployment (their labels match the selector).

updatedReplicas
int32
(Optional)

updatedReplicas defines the total number of non-terminated pods targeted by this Prometheus deployment that have the desired version spec.

availableReplicas
int32
(Optional)

availableReplicas defines the total number of available pods (ready for at least minReadySeconds) targeted by this Prometheus deployment.

unavailableReplicas
int32
(Optional)

unavailableReplicas defines the total number of unavailable pods targeted by this Prometheus deployment.

conditions
[]Condition
(Optional)

conditions defines the current state of the Prometheus deployment.

shardStatuses
[]ShardStatus
(Optional)

shardStatuses defines the list has one entry per shard. Each entry provides a summary of the shard status.

shards
int32
(Optional)

shards defines the most recently observed number of shards.

selector
string
(Optional)

selector used to match the pods targeted by this Prometheus resource.

PrometheusTracingConfig

(Appears on:CommonPrometheusFields)

Field Description
clientType
string
(Optional)

clientType defines the client used to export the traces. Supported values are http or grpc.

endpoint
string

endpoint to send the traces to. Should be provided in format :.

samplingFraction
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

samplingFraction defines the probability a given trace will be sampled. Must be a float from 0 through 1.

insecure
bool
(Optional)

insecure if disabled, the client will use a secure connection.

headers
map[string]string
(Optional)

headers defines the key-value pairs to be used as headers associated with gRPC or HTTP requests.

compression
string
(Optional)

compression key for supported compression types. The only supported value is gzip.

timeout
Duration
(Optional)

timeout defines the maximum time the exporter will wait for each batch export.

tlsConfig
TLSConfig
(Optional)

tlsConfig to use when sending traces.

PrometheusWebSpec

(Appears on:CommonPrometheusFields)

PrometheusWebSpec defines the configuration of the Prometheus web server.

Field Description
tlsConfig
WebTLSConfig
(Optional)

tlsConfig defines the TLS parameters for HTTPS.

httpConfig
WebHTTPConfig
(Optional)

httpConfig defines HTTP parameters for web server.

pageTitle
string
(Optional)

pageTitle defines the prometheus web page title.

maxConnections
int32
(Optional)

maxConnections defines the maximum number of simultaneous connections A zero value means that Prometheus doesn’t accept any incoming connection.

ProxyConfig

(Appears on:APIServerConfig, AlertmanagerEndpoints, Endpoint, HTTPConfig, OAuth2, PodMetricsEndpoint, ProberSpec, RemoteReadSpec, RemoteWriteSpec, AzureSDConfig, ConsulSDConfig, DigitalOceanSDConfig, DockerSDConfig, DockerSwarmSDConfig, EC2SDConfig, EurekaSDConfig, HTTPConfig, HTTPSDConfig, HetznerSDConfig, IonosSDConfig, KubernetesSDConfig, KumaSDConfig, LightSailSDConfig, LinodeSDConfig, NomadSDConfig, PuppetDBSDConfig, ScalewaySDConfig, ScrapeConfigSpec, HTTPConfig)

Field Description
proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

QuerySpec

(Appears on:PrometheusSpec)

QuerySpec defines the query command line flags when starting Prometheus.

Field Description
lookbackDelta
string
(Optional)

lookbackDelta defines the delta difference allowed for retrieving metrics during expression evaluations.

maxConcurrency
int32
(Optional)

maxConcurrency defines the number of concurrent queries that can be run at once.

maxSamples
int32
(Optional)

maxSamples defines the maximum number of samples a single query can load into memory. Note that queries will fail if they would load more samples than this into memory, so this also limits the number of samples a query can return.

timeout
Duration
(Optional)

timeout defines the maximum time a query may take before being aborted.

QueueConfig

(Appears on:RemoteWriteSpec)

QueueConfig allows the tuning of remote write’s queue_config parameters. This object is referenced in the RemoteWriteSpec object.

Field Description
capacity
int
(Optional)

capacity defines the number of samples to buffer per shard before we start dropping them.

minShards
int
(Optional)

minShards defines the minimum number of shards, i.e. amount of concurrency.

maxShards
int
(Optional)

maxShards defines the maximum number of shards, i.e. amount of concurrency.

maxSamplesPerSend
int
(Optional)

maxSamplesPerSend defines the maximum number of samples per send.

batchSendDeadline
Duration
(Optional)

batchSendDeadline defines the maximum time a sample will wait in buffer.

maxRetries
int
(Optional)

maxRetries defines the maximum number of times to retry a batch on recoverable errors.

minBackoff
Duration
(Optional)

minBackoff defines the initial retry delay. Gets doubled for every retry.

maxBackoff
Duration
(Optional)

maxBackoff defines the maximum retry delay.

retryOnRateLimit
bool
(Optional)

retryOnRateLimit defines the retry upon receiving a 429 status code from the remote-write storage.

This is an experimental feature, it may change in any upcoming release in a breaking way.

sampleAgeLimit
Duration
(Optional)

sampleAgeLimit drops samples older than the limit. It requires Prometheus >= v2.50.0 or Thanos >= v0.32.0.

RelabelConfig

(Appears on:AlertmanagerEndpoints, Endpoint, PodMetricsEndpoint, ProbeSpec, ProbeTargetIngress, ProbeTargetStaticConfig, RemoteWriteSpec, ScrapeClass, ScrapeConfigSpec)

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

Field Description
sourceLabels
[]LabelName
(Optional)

sourceLabels defines the source labels select values from existing labels. Their content is concatenated using the configured Separator and matched against the configured regular expression.

separator
string
(Optional)

separator defines the string between concatenated SourceLabels.

targetLabel
string
(Optional)

targetLabel defines the 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.

regex
string
(Optional)

regex defines the regular expression against which the extracted value is matched.

modulus
uint64
(Optional)

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

Only applicable when the action is HashMod.

replacement
string
(Optional)

replacement value against which a Replace action is performed if the regular expression matches.

Regex capture groups are available.

action
string
(Optional)

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”

ReloadStrategyType (string alias)

(Appears on:CommonPrometheusFields)

Value Description

"HTTP"

HTTPReloadStrategyType reloads the configuration using the /-/reload HTTP endpoint.

"ProcessSignal"

ProcessSignalReloadStrategyType reloads the configuration by sending a SIGHUP signal to the process.

RemoteReadSpec

(Appears on:PrometheusSpec)

RemoteReadSpec defines the configuration for Prometheus to read back samples from a remote endpoint.

Field Description
url
string

url defines the URL of the endpoint to query from.

name
string
(Optional)

name of the remote read queue, it must be unique if specified. The name is used in metrics and logging in order to differentiate read configurations.

It requires Prometheus >= v2.15.0.

requiredMatchers
map[string]string
(Optional)

requiredMatchers defines an optional list of equality matchers which have to be present in a selector to query the remote read endpoint.

remoteTimeout
Duration
(Optional)

remoteTimeout defines the timeout for requests to the remote read endpoint.

headers
map[string]string
(Optional)

headers defines the custom HTTP headers to be sent along with each remote read request. Be aware that headers that are set by Prometheus itself can’t be overwritten. Only valid in Prometheus versions 2.26.0 and newer.

readRecent
bool
(Optional)

readRecent defines whether reads should be made for queries for time ranges that the local storage should have complete data for.

oauth2
OAuth2
(Optional)

oauth2 configuration for the URL.

It requires Prometheus >= v2.27.0.

Cannot be set at the same time as authorization, or basicAuth.

basicAuth
BasicAuth
(Optional)

basicAuth configuration for the URL.

Cannot be set at the same time as authorization, or oauth2.

bearerTokenFile
string
(Optional)

bearerTokenFile defines the file from which to read the bearer token for the URL.

Deprecated: this will be removed in a future release. Prefer using authorization.

authorization
Authorization
(Optional)

authorization section for the URL.

It requires Prometheus >= v2.26.0.

Cannot be set at the same time as basicAuth, or oauth2.

bearerToken
string
(Optional)

bearerToken is deprecated: this will be removed in a future release. Warning: this field shouldn’t be used because the token value appears in clear-text. Prefer using authorization.

tlsConfig
TLSConfig
(Optional)

tlsConfig to use for the URL.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

It requires Prometheus >= v2.26.0.

filterExternalLabels
bool
(Optional)

filterExternalLabels defines whether to use the external labels as selectors for the remote read endpoint.

It requires Prometheus >= v2.34.0.

RemoteWriteMessageVersion (string alias)

(Appears on:CommonPrometheusFields, RemoteWriteSpec)

Value Description

"V1.0"

Remote Write message’s version 1.0.

"V2.0"

Remote Write message’s version 2.0.

RemoteWriteSpec

(Appears on:CommonPrometheusFields, ThanosRulerSpec)

RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint.

Field Description
url
string

url defines the URL of the endpoint to send samples to.

name
string
(Optional)

name of the remote write queue, it must be unique if specified. The name is used in metrics and logging in order to differentiate queues.

It requires Prometheus >= v2.15.0 or Thanos >= 0.24.0.

messageVersion
RemoteWriteMessageVersion
(Optional)

messageVersion defines the Remote Write message’s version to use when writing to the endpoint.

Version1.0 corresponds to the prometheus.WriteRequest protobuf message introduced in Remote Write 1.0. Version2.0 corresponds to the io.prometheus.write.v2.Request protobuf message introduced in Remote Write 2.0.

When Version2.0 is selected, Prometheus will automatically be configured to append the metadata of scraped metrics to the WAL.

Before setting this field, consult with your remote storage provider what message version it supports.

It requires Prometheus >= v2.54.0 or Thanos >= v0.37.0.

sendExemplars
bool
(Optional)

sendExemplars enables sending of exemplars over remote write. Note that exemplar-storage itself must be enabled using the spec.enableFeatures option for exemplars to be scraped in the first place.

It requires Prometheus >= v2.27.0 or Thanos >= v0.24.0.

sendNativeHistograms
bool
(Optional)

sendNativeHistograms enables sending of native histograms, also known as sparse histograms over remote write.

It requires Prometheus >= v2.40.0 or Thanos >= v0.30.0.

remoteTimeout
Duration
(Optional)

remoteTimeout defines the timeout for requests to the remote write endpoint.

headers
map[string]string
(Optional)

headers defines the custom HTTP headers to be sent along with each remote write request. Be aware that headers that are set by Prometheus itself can’t be overwritten.

It requires Prometheus >= v2.25.0 or Thanos >= v0.24.0.

writeRelabelConfigs
[]RelabelConfig
(Optional)

writeRelabelConfigs defines the list of remote write relabel configurations.

oauth2
OAuth2
(Optional)

oauth2 configuration for the URL.

It requires Prometheus >= v2.27.0 or Thanos >= v0.24.0.

Cannot be set at the same time as sigv4, authorization, basicAuth, or azureAd.

basicAuth
BasicAuth
(Optional)

basicAuth configuration for the URL.

Cannot be set at the same time as sigv4, authorization, oauth2, or azureAd.

bearerTokenFile
string
(Optional)

bearerTokenFile defines the file from which to read bearer token for the URL.

Deprecated: this will be removed in a future release. Prefer using authorization.

authorization
Authorization
(Optional)

authorization section for the URL.

It requires Prometheus >= v2.26.0 or Thanos >= v0.24.0.

Cannot be set at the same time as sigv4, basicAuth, oauth2, or azureAd.

sigv4
Sigv4
(Optional)

sigv4 defines the AWS’s Signature Verification 4 for the URL.

It requires Prometheus >= v2.26.0 or Thanos >= v0.24.0.

Cannot be set at the same time as authorization, basicAuth, oauth2, or azureAd.

azureAd
AzureAD
(Optional)

azureAd for the URL.

It requires Prometheus >= v2.45.0 or Thanos >= v0.31.0.

Cannot be set at the same time as authorization, basicAuth, oauth2, or sigv4.

bearerToken
string
(Optional)

bearerToken is deprecated: this will be removed in a future release. Warning: this field shouldn’t be used because the token value appears in clear-text. Prefer using authorization.

tlsConfig
TLSConfig
(Optional)

tlsConfig to use for the URL.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

It requires Prometheus >= v2.26.0 or Thanos >= v0.24.0.

queueConfig
QueueConfig
(Optional)

queueConfig allows tuning of the remote write queue parameters.

metadataConfig
MetadataConfig
(Optional)

metadataConfig defines how to send a series metadata to the remote storage.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

roundRobinDNS
bool
(Optional)

roundRobinDNS controls the DNS resolution behavior for remote-write connections. When enabled: - The remote-write mechanism will resolve the hostname via DNS. - It will randomly select one of the resolved IP addresses and connect to it.

When disabled (default behavior): - The Go standard library will handle hostname resolution. - It will attempt connections to each resolved IP address sequentially.

Note: The connection timeout applies to the entire resolution and connection process.

If disabled, the timeout is distributed across all connection attempts.

It requires Prometheus >= v3.1.0 or Thanos >= v0.38.0.

RetainConfig

(Appears on:ShardRetentionPolicy)

Field Description
retentionPeriod
Duration

retentionPeriod defines the retentionPeriod for shard retention policy.

Rule

(Appears on:RuleGroup)

Rule describes an alerting or recording rule See Prometheus documentation: alerting or recording rule

Field Description
record
string
(Optional)

record defines the name of the time series to output to. Must be a valid metric name. Only one of record and alert must be set.

alert
string
(Optional)

alert defines the name of the alert. Must be a valid label value. Only one of record and alert must be set.

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

expr defines the PromQL expression to evaluate.

for
Duration
(Optional)

for defines how alerts are considered firing once they have been returned for this long.

keep_firing_for
NonEmptyDuration
(Optional)

keep_firing_for defines how long an alert will continue firing after the condition that triggered it has cleared.

labels
map[string]string
(Optional)

labels defines labels to add or overwrite.

annotations
map[string]string
(Optional)

annotations defines annotations to add to each alert. Only valid for alerting rules.

RuleGroup

(Appears on:PrometheusRuleSpec)

RuleGroup is a list of sequentially evaluated recording and alerting rules.

Field Description
name
string

name defines the name of the rule group.

labels
map[string]string
(Optional)

labels define the labels to add or overwrite before storing the result for its rules. The labels defined at the rule level take precedence.

It requires Prometheus >= 3.0.0. The field is ignored for Thanos Ruler.

interval
Duration
(Optional)

interval defines how often rules in the group are evaluated.

query_offset
Duration
(Optional)

query_offset defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past.

It requires Prometheus >= v2.53.0. It is not supported for ThanosRuler.

rules
[]Rule
(Optional)

rules defines the list of alerting and recording rules.

partial_response_strategy
string
(Optional)

partial_response_strategy 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

limit
int
(Optional)

limit defines 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.

Rules

(Appears on:PrometheusSpec)

Field Description
alert
RulesAlert
(Optional)

alert defines the parameters of the Prometheus rules’ engine.

Any update to these parameters trigger a restart of the pods.

RulesAlert

(Appears on:Rules)

Field Description
forOutageTolerance
string
(Optional)

forOutageTolerance defines the max time to tolerate prometheus outage for restoring ‘for’ state of alert.

forGracePeriod
string
(Optional)

forGracePeriod defines the minimum duration between alert and restored ‘for’ state.

This is maintained only for alerts with a configured ‘for’ time greater than the grace period.

resendDelay
string
(Optional)

resendDelay defines the minimum amount of time to wait before resending an alert to Alertmanager.

RuntimeConfig

(Appears on:CommonPrometheusFields)

RuntimeConfig configures the values for the process behavior.

Field Description
goGC
int32
(Optional)

goGC defines the Go garbage collection target percentage. Lowering this number may increase the CPU usage. See: https://tip.golang.org/doc/gc-guide#GOGC

SafeAuthorization

(Appears on:AlertmanagerEndpoints, Authorization, Endpoint, HTTPConfig, PodMetricsEndpoint, ProbeSpec, AzureSDConfig, ConsulSDConfig, DigitalOceanSDConfig, DockerSDConfig, DockerSwarmSDConfig, EurekaSDConfig, HTTPConfig, HTTPSDConfig, HetznerSDConfig, IonosSDConfig, KubernetesSDConfig, KumaSDConfig, LightSailSDConfig, LinodeSDConfig, NomadSDConfig, PuppetDBSDConfig, ScrapeConfigSpec, HTTPConfig)

SafeAuthorization specifies a subset of the Authorization struct, that is safe for use because it doesn’t provide access to the Prometheus container’s filesystem.

Field Description
type
string
(Optional)

type defines the authentication type. The value is case-insensitive.

“Basic” is not a supported value.

Default: “Bearer”

credentials
Kubernetes core/v1.SecretKeySelector
(Optional)

credentials defines a key of a Secret in the namespace that contains the credentials for authentication.

SafeTLSConfig

(Appears on:ClusterTLSConfig, GlobalSMTPConfig, HTTPConfig, OAuth2, PodMetricsEndpoint, ProbeSpec, TLSConfig, AzureSDConfig, ConsulSDConfig, DigitalOceanSDConfig, DockerSDConfig, DockerSwarmSDConfig, EC2SDConfig, EmailConfig, EurekaSDConfig, HTTPConfig, HTTPSDConfig, HetznerSDConfig, IonosSDConfig, KubernetesSDConfig, KumaSDConfig, LightSailSDConfig, LinodeSDConfig, NomadSDConfig, OpenStackSDConfig, PuppetDBSDConfig, ScalewaySDConfig, ScrapeConfigSpec, EmailConfig, HTTPConfig)

SafeTLSConfig specifies safe TLS configuration parameters.

Field Description
ca
SecretOrConfigMap
(Optional)

ca defines the Certificate authority used when verifying server certificates.

cert
SecretOrConfigMap
(Optional)

cert defines the Client certificate to present when doing client-authentication.

keySecret
Kubernetes core/v1.SecretKeySelector
(Optional)

keySecret defines the Secret containing the client key file for the targets.

serverName
string
(Optional)

serverName is used to verify the hostname for the targets.

insecureSkipVerify
bool
(Optional)

insecureSkipVerify defines how to disable target certificate validation.

minVersion
TLSVersion
(Optional)

minVersion defines the minimum acceptable TLS version.

It requires Prometheus >= v2.35.0 or Thanos >= v0.28.0.

maxVersion
TLSVersion
(Optional)

maxVersion defines the maximum acceptable TLS version.

It requires Prometheus >= v2.41.0 or Thanos >= v0.31.0.

ScrapeClass

(Appears on:CommonPrometheusFields)

Field Description
name
string

name of the scrape class.

default
bool
(Optional)

default defines that the scrape applies to all scrape objects that don’t configure an explicit scrape class name.

Only one scrape class can be set as the default.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type. It will only apply if the scrape resource doesn’t specify any FallbackScrapeProtocol

It requires Prometheus >= v3.0.0.

tlsConfig
TLSConfig
(Optional)

tlsConfig defines the TLS settings to use for the scrape. When the scrape objects define their own CA, certificate and/or key, they take precedence over the corresponding scrape class fields.

For now only the caFile, certFile and keyFile fields are supported.

authorization
Authorization
(Optional)

authorization section for the ScrapeClass. It will only apply if the scrape resource doesn’t specify any Authorization.

relabelings
[]RelabelConfig
(Optional)

relabelings defines the relabeling rules to apply to all scrape targets.

The Operator automatically adds relabelings for a few standard Kubernetes fields like __meta_kubernetes_namespace and __meta_kubernetes_service_name. Then the Operator adds the scrape class relabelings defined here. Then the Operator adds the target-specific relabelings defined in the scrape object.

More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

metricRelabelings
[]RelabelConfig
(Optional)

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

The Operator adds the scrape class metric relabelings defined here. Then the Operator adds the target-specific metric relabelings defined in ServiceMonitors, PodMonitors, Probes and ScrapeConfigs. Then the Operator adds namespace enforcement relabeling rule, specified in ‘.spec.enforcedNamespaceLabel’.

More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs

attachMetadata
AttachMetadata
(Optional)

attachMetadata defines additional metadata to the discovered targets. When the scrape object defines its own configuration, it takes precedence over the scrape class configuration.

ScrapeProtocol (string alias)

(Appears on:CommonPrometheusFields, PodMonitorSpec, ProbeSpec, ScrapeClass, ServiceMonitorSpec, ScrapeConfigSpec)

ScrapeProtocol represents a protocol used by Prometheus for scraping metrics. Supported values are: * OpenMetricsText0.0.1 * OpenMetricsText1.0.0 * PrometheusProto * PrometheusText0.0.4 * PrometheusText1.0.0

Value Description

"OpenMetricsText0.0.1"

"OpenMetricsText1.0.0"

"PrometheusProto"

"PrometheusText0.0.4"

"PrometheusText1.0.0"

SecretOrConfigMap

(Appears on:AlertmanagerConfiguration, OAuth2, SafeTLSConfig, WebTLSConfig)

SecretOrConfigMap allows to specify data as a Secret or ConfigMap. Fields are mutually exclusive.

Field Description
secret
Kubernetes core/v1.SecretKeySelector
(Optional)

secret defines the Secret containing data to use for the targets.

configMap
Kubernetes core/v1.ConfigMapKeySelector
(Optional)

configMap defines the ConfigMap containing data to use for the targets.

SelectorMechanism (string alias)

(Appears on:PodMonitorSpec, ServiceMonitorSpec)

Value Description

"RelabelConfig"

"RoleSelector"

ServiceDiscoveryRole (string alias)

(Appears on:CommonPrometheusFields)

Value Description

"EndpointSlice"

"Endpoints"

ServiceMonitorSpec

(Appears on:ServiceMonitor)

ServiceMonitorSpec defines the specification parameters for a ServiceMonitor.

Field Description
jobLabel
string
(Optional)

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.

targetLabels
[]string
(Optional)

targetLabels defines the labels which are transferred from the associated Kubernetes Service object onto the ingested metrics.

podTargetLabels
[]string
(Optional)

podTargetLabels defines the labels which are transferred from the associated Kubernetes Pod object onto the ingested metrics.

endpoints
[]Endpoint

endpoints defines the list of endpoints part of this ServiceMonitor. Defines how to scrape metrics from Kubernetes Endpoints objects. In most cases, an Endpoints object is backed by a Kubernetes Service object with the same name and labels.

selector
Kubernetes meta/v1.LabelSelector

selector defines the label selector to select the Kubernetes Endpoints objects to scrape metrics from.

selectorMechanism
SelectorMechanism
(Optional)

selectorMechanism defines the mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated.

It requires Prometheus >= v2.17.0.

namespaceSelector
NamespaceSelector
(Optional)

namespaceSelector defines in which namespace(s) Prometheus should discover the services. By default, the services are discovered in the same namespace as the ServiceMonitor object but it is possible to select pods across different/all namespaces.

sampleLimit
uint64
(Optional)

sampleLimit defines a per-scrape limit on the number of scraped samples that will be accepted.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.

It requires Prometheus >= v3.0.0.

targetLimit
uint64
(Optional)

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

labelLimit
uint64
(Optional)

labelLimit defines the per-scrape limit on number of labels that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample.

It requires Prometheus >= v2.27.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

attachMetadata
AttachMetadata
(Optional)

attachMetadata defines additional metadata which is added to the discovered targets.

It requires Prometheus >= v2.37.0.

scrapeClass
string
(Optional)

scrapeClass defines the scrape class to apply.

bodySizeLimit
ByteSize
(Optional)

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

ShardRetentionPolicy

(Appears on:PrometheusSpec)

Field Description
whenScaled
WhenScaledRetentionType
(Optional)

whenScaled defines the retention policy when the Prometheus shards are scaled down. * Delete, the operator will delete the pods from the scaled-down shard(s). * Retain, the operator will keep the pods from the scaled-down shard(s), so the data can still be queried.

If not defined, the operator assumes the Delete value.

retain
RetainConfig
(Optional)

retain defines the config for retention when the retention policy is set to Retain. This field is ineffective as of now.

ShardStatus

(Appears on:PrometheusStatus)

Field Description
shardID
string

shardID defines the identifier of the shard.

replicas
int32

replicas defines the total number of pods targeted by this shard.

updatedReplicas
int32

updatedReplicas defines the total number of non-terminated pods targeted by this shard that have the desired spec.

availableReplicas
int32

availableReplicas defines the total number of available pods (ready for at least minReadySeconds) targeted by this shard.

unavailableReplicas
int32

unavailableReplicas defines the Total number of unavailable pods targeted by this shard.

Sigv4

(Appears on:AlertmanagerEndpoints, RemoteWriteSpec, SNSConfig, SNSConfig)

Sigv4 defines AWS’s Signature Verification 4 signing process to sign requests.

Field Description
region
string
(Optional)

region defines the AWS region. If blank, the region from the default credentials chain used.

accessKey
Kubernetes core/v1.SecretKeySelector
(Optional)

accessKey defines the AWS API key. If not specified, the environment variable AWS_ACCESS_KEY_ID is used.

secretKey
Kubernetes core/v1.SecretKeySelector
(Optional)

secretKey defines the AWS API secret. If not specified, the environment variable AWS_SECRET_ACCESS_KEY is used.

profile
string
(Optional)

profile defines the named AWS profile used to authenticate.

roleArn
string
(Optional)

roleArn defines the named AWS profile used to authenticate.

StorageSpec

(Appears on:AlertmanagerSpec, CommonPrometheusFields, ThanosRulerSpec)

StorageSpec defines the configured storage for a group Prometheus servers. If no storage option is specified, then by default an EmptyDir will be used.

If multiple storage options are specified, priority will be given as follows: 1. emptyDir 2. ephemeral 3. volumeClaimTemplate

Field Description
disableMountSubPath
bool
(Optional)

disableMountSubPath deprecated: subPath usage will be removed in a future release.

emptyDir
Kubernetes core/v1.EmptyDirVolumeSource
(Optional)

emptyDir to be used by the StatefulSet. If specified, it takes precedence over ephemeral and volumeClaimTemplate. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir

ephemeral
Kubernetes core/v1.EphemeralVolumeSource
(Optional)

ephemeral to be used by the StatefulSet. This is a beta field in k8s 1.21 and GA in 1.15. For lower versions, starting with k8s 1.19, it requires enabling the GenericEphemeralVolume feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes

volumeClaimTemplate
EmbeddedPersistentVolumeClaim
(Optional)

volumeClaimTemplate defines the PVC spec to be used by the Prometheus StatefulSets. The easiest way to use a volume that cannot be automatically provisioned is to use a label selector alongside manually created PersistentVolumes.

TLSConfig

(Appears on:APIServerConfig, AlertmanagerEndpoints, Endpoint, PrometheusTracingConfig, RemoteReadSpec, RemoteWriteSpec, ScrapeClass, ThanosRulerSpec, ThanosSpec)

TLSConfig extends the safe TLS configuration with file parameters.

Field Description
ca
SecretOrConfigMap
(Optional)

ca defines the Certificate authority used when verifying server certificates.

cert
SecretOrConfigMap
(Optional)

cert defines the Client certificate to present when doing client-authentication.

keySecret
Kubernetes core/v1.SecretKeySelector
(Optional)

keySecret defines the Secret containing the client key file for the targets.

serverName
string
(Optional)

serverName is used to verify the hostname for the targets.

insecureSkipVerify
bool
(Optional)

insecureSkipVerify defines how to disable target certificate validation.

minVersion
TLSVersion
(Optional)

minVersion defines the minimum acceptable TLS version.

It requires Prometheus >= v2.35.0 or Thanos >= v0.28.0.

maxVersion
TLSVersion
(Optional)

maxVersion defines the maximum acceptable TLS version.

It requires Prometheus >= v2.41.0 or Thanos >= v0.31.0.

caFile
string
(Optional)

caFile defines the path to the CA cert in the Prometheus container to use for the targets.

certFile
string
(Optional)

certFile defines the path to the client cert file in the Prometheus container for the targets.

keyFile
string
(Optional)

keyFile defines the path to the client key file in the Prometheus container for the targets.

TLSVersion (string alias)

(Appears on:SafeTLSConfig)

Value Description

"TLS10"

"TLS11"

"TLS12"

"TLS13"

TSDBSpec

(Appears on:CommonPrometheusFields)

Field Description
outOfOrderTimeWindow
Duration
(Optional)

outOfOrderTimeWindow defines how old an out-of-order/out-of-bounds sample can be with respect to the TSDB max time.

An out-of-order/out-of-bounds sample is ingested into the TSDB as long as the timestamp of the sample is >= (TSDB.MaxTime - outOfOrderTimeWindow).

This is an experimental feature, it may change in any upcoming release in a breaking way.

It requires Prometheus >= v2.39.0 or PrometheusAgent >= v2.54.0.

ThanosRulerSpec

(Appears on:ThanosRuler)

ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Field Description
version
string
(Optional)

version of Thanos to be deployed.

podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the ThanosRuler pods.

The following items are reserved and cannot be overridden: * “app.kubernetes.io/name” label, set to “thanos-ruler”. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/instance” label, set to the name of the ThanosRuler instance. * “thanos-ruler” label, set to the name of the ThanosRuler instance. * “kubectl.kubernetes.io/default-container” annotation, set to “thanos-ruler”.

image
string
(Optional)

image defines Thanos container image URL.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy defines for the ‘thanos’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets defines an optional list of references to secrets in the same namespace to use for pulling thanos images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

paused
bool
(Optional)

paused defines when a ThanosRuler deployment is paused, no actions except for deletion will be performed on the underlying objects.

replicas
int32
(Optional)

replicas defines the number of thanos ruler instances to deploy.

nodeSelector
map[string]string
(Optional)

nodeSelector defines which Nodes the Pods are scheduled on.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resource requirements for single Pods. If not provided, no requests/limits will be set

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines when specified, the pod’s scheduling constraints.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines when specified, the pod’s tolerations.

topologySpreadConstraints
[]Kubernetes core/v1.TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the pod’s topology spread constraints.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext defines the pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines Defines the DNS configuration for the pods.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

priorityClassName
string
(Optional)

priorityClassName defines the priority class assigned to the Pods

serviceName
string
(Optional)

serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the ThanosRuler resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named thanos-ruler-operated for ThanosRuler resources. When deploying multiple ThanosRuler resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

serviceAccountName
string
(Optional)

serviceAccountName defines the name of the ServiceAccount to use to run the Thanos Ruler Pods.

storage
StorageSpec
(Optional)

storage defines the specification of how storage shall be used.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes defines how configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts defines how the configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the ruler container, that are generated as a result of StorageSpec objects.

objectStorageConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

objectStorageConfig defines the configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage

The operator performs no validation of the configuration.

objectStorageConfigFile takes precedence over this field.

objectStorageConfigFile
string
(Optional)

objectStorageConfigFile defines the path of the object storage configuration file.

The configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage

The operator performs no validation of the configuration file.

This field takes precedence over objectStorageConfig.

listenLocal
bool
(Optional)

listenLocal defines the Thanos ruler listen on loopback, so that it does not bind against the Pod IP.

queryEndpoints
[]string
(Optional)

queryEndpoints defines the list of Thanos Query endpoints from which to query metrics.

For Thanos >= v0.11.0, it is recommended to use queryConfig instead.

queryConfig takes precedence over this field.

queryConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

queryConfig defines the list of Thanos Query endpoints from which to query metrics.

The configuration format is defined at https://thanos.io/tip/components/rule.md/#query-api

It requires Thanos >= v0.11.0.

The operator performs no validation of the configuration.

This field takes precedence over queryEndpoints.

alertmanagersUrl
[]string
(Optional)

alertmanagersUrl defines the list of Alertmanager endpoints to send alerts to.

For Thanos >= v0.10.0, it is recommended to use alertmanagersConfig instead.

alertmanagersConfig takes precedence over this field.

alertmanagersConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

alertmanagersConfig defines the list of Alertmanager endpoints to send alerts to.

The configuration format is defined at https://thanos.io/tip/components/rule.md/#alertmanager.

It requires Thanos >= v0.10.0.

The operator performs no validation of the configuration.

This field takes precedence over alertmanagersUrl.

ruleSelector
Kubernetes meta/v1.LabelSelector
(Optional)

ruleSelector defines the PrometheusRule objects to be selected for rule evaluation. An empty label selector matches all objects. A null label selector matches no objects.

ruleNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

ruleNamespaceSelector defines the namespaces to be selected for Rules discovery. If unspecified, only the same namespace as the ThanosRuler object is in is used.

enforcedNamespaceLabel
string
(Optional)

enforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created.

excludedFromEnforcement
[]ObjectReference
(Optional)

excludedFromEnforcement defines the list of references to PrometheusRule objects to be excluded from enforcing a namespace label of origin. Applies only if enforcedNamespaceLabel set to true.

prometheusRulesExcludedFromEnforce
[]PrometheusRuleExcludeConfig
(Optional)

prometheusRulesExcludedFromEnforce defines a list of Prometheus rules to be excluded from enforcing of adding namespace labels. Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair Deprecated: use excludedFromEnforcement instead.

logLevel
string
(Optional)

logLevel for ThanosRuler to be configured with.

logFormat
string
(Optional)

logFormat for ThanosRuler to be configured with.

portName
string
(Optional)

portName defines the port name used for the pods and governing service. Defaults to web.

evaluationInterval
Duration
(Optional)

evaluationInterval defines the interval between consecutive evaluations.

resendDelay
Duration
(Optional)

resendDelay defines the minimum amount of time to wait before resending an alert to Alertmanager.

ruleOutageTolerance
Duration
(Optional)

ruleOutageTolerance defines the max time to tolerate prometheus outage for restoring “for” state of alert. It requires Thanos >= v0.30.0.

ruleQueryOffset
Duration
(Optional)

ruleQueryOffset defines the default rule group’s query offset duration to use. It requires Thanos >= v0.38.0.

ruleConcurrentEval
int32
(Optional)

ruleConcurrentEval defines how many rules can be evaluated concurrently. It requires Thanos >= v0.37.0.

ruleGracePeriod
Duration
(Optional)

ruleGracePeriod defines the minimum duration between alert and restored “for” state. This is maintained only for alerts with configured “for” time greater than grace period. It requires Thanos >= v0.30.0.

retention
Duration
(Optional)

retention defines the time duration ThanosRuler shall retain data for. Default is ‘24h’, and must match the regular expression [0-9]+(ms|s|m|h|d|w|y) (milliseconds seconds minutes hours days weeks years).

The field has no effect when remote-write is configured since the Ruler operates in stateless mode.

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to a ThanosRuler pod or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch. The current container names are: thanos-ruler and config-reloader. Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the ThanosRuler configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ Using initContainers for any use case other then secret fetching is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

tracingConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

tracingConfig defines the tracing configuration.

The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration

This is an experimental feature, it may change in any upcoming release in a breaking way.

The operator performs no validation of the configuration.

tracingConfigFile takes precedence over this field.

tracingConfigFile
string
(Optional)

tracingConfigFile defines the path of the tracing configuration file.

The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration

This is an experimental feature, it may change in any upcoming release in a breaking way.

The operator performs no validation of the configuration file.

This field takes precedence over tracingConfig.

labels
map[string]string
(Optional)

labels defines the external label pairs of the ThanosRuler resource.

A default replica label thanos_ruler_replica will be always added as a label with the value of the pod’s name.

alertDropLabels
[]string
(Optional)

alertDropLabels defines the label names which should be dropped in Thanos Ruler alerts.

The replica label thanos_ruler_replica will always be dropped from the alerts.

externalPrefix
string
(Optional)

externalPrefix defines the Thanos Ruler instances will be available under. This is necessary to generate correct URLs. This is necessary if Thanos Ruler is not served from root of a DNS name.

routePrefix
string
(Optional)

routePrefix defines the route prefix ThanosRuler registers HTTP handlers for. This allows thanos UI to be served on a sub-path.

grpcServerTlsConfig
TLSConfig
(Optional)

grpcServerTlsConfig defines the gRPC server from which Thanos Querier reads recorded rule data. Note: Currently only the CAFile, CertFile, and KeyFile fields are supported. Maps to the ‘–grpc-server-tls-*’ CLI args.

alertQueryUrl
string
(Optional)

alertQueryUrl defines how Thanos Ruler will set in the ‘Source’ field of all alerts. Maps to the ‘–alert.query-url’ CLI arg.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

alertRelabelConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

alertRelabelConfigs defines the alert relabeling in Thanos Ruler.

Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs

The operator performs no validation of the configuration.

alertRelabelConfigFile takes precedence over this field.

alertRelabelConfigFile
string
(Optional)

alertRelabelConfigFile defines the path to the alert relabeling configuration file.

Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs

The operator performs no validation of the configuration file.

This field takes precedence over alertRelabelConfig.

hostAliases
[]HostAlias
(Optional)

hostAliases defines pods’ hostAliases configuration

additionalArgs
[]Argument
(Optional)

additionalArgs defines how to add additional arguments for the ThanosRuler container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the ThanosRuler container which may cause issues if they are invalid or not supported by the given ThanosRuler version. In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument the reconciliation will fail and an error will be logged.

web
ThanosRulerWebSpec
(Optional)

web defines the configuration of the ThanosRuler web server.

remoteWrite
[]RemoteWriteSpec
(Optional)

remoteWrite defines the list of remote write configurations.

When the list isn’t empty, the ruler is configured with stateless mode.

It requires Thanos >= 0.24.0.

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 120 seconds.

enableFeatures
[]EnableFeature
(Optional)

enableFeatures defines how to setup Thanos Ruler feature flags. By default, no features are enabled.

Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

For more information see https://thanos.io/tip/components/rule.md/

It requires Thanos >= 0.39.0.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

ThanosRulerStatus

(Appears on:ThanosRuler)

ThanosRulerStatus is the most recent observed status of the ThanosRuler. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Field Description
paused
bool
(Optional)

paused defines whether any actions on the underlying managed objects are being performed. Only delete actions will be performed.

replicas
int32
(Optional)

replicas defines the total number of non-terminated pods targeted by this ThanosRuler deployment (their labels match the selector).

updatedReplicas
int32
(Optional)

updatedReplicas defines the total number of non-terminated pods targeted by this ThanosRuler deployment that have the desired version spec.

availableReplicas
int32
(Optional)

availableReplicas defines the total number of available pods (ready for at least minReadySeconds) targeted by this ThanosRuler deployment.

unavailableReplicas
int32
(Optional)

unavailableReplicas defines the total number of unavailable pods targeted by this ThanosRuler deployment.

conditions
[]Condition
(Optional)

conditions defines the current state of the ThanosRuler object.

ThanosRulerWebSpec

(Appears on:ThanosRulerSpec)

ThanosRulerWebSpec defines the configuration of the ThanosRuler web server.

Field Description
tlsConfig
WebTLSConfig
(Optional)

tlsConfig defines the TLS parameters for HTTPS.

httpConfig
WebHTTPConfig
(Optional)

httpConfig defines HTTP parameters for web server.

ThanosSpec

(Appears on:PrometheusSpec)

ThanosSpec defines the configuration of the Thanos sidecar.

Field Description
image
string
(Optional)

image defines the container image name for Thanos. If specified, it takes precedence over the spec.thanos.baseImage, spec.thanos.tag and spec.thanos.sha fields.

Specifying spec.thanos.version is still necessary to ensure the Prometheus Operator knows which version of Thanos is being configured.

If neither spec.thanos.image nor spec.thanos.baseImage are defined, the operator will use the latest upstream version of Thanos available at the time when the operator was released.

version
string
(Optional)

version of Thanos being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.

If not specified, the operator assumes the latest upstream release of Thanos available at the time when the version of the operator was released.

tag
string
(Optional)

tag is deprecated: use ‘image’ instead. The image’s tag can be specified as as part of the image name.

sha
string
(Optional)

sha is deprecated: use ‘image’ instead. The image digest can be specified as part of the image name.

baseImage
string
(Optional)

baseImage is deprecated: use ‘image’ instead.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resources requests and limits of the Thanos sidecar.

objectStorageConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

objectStorageConfig defines the Thanos sidecar’s configuration to upload TSDB blocks to object storage.

More info: https://thanos.io/tip/thanos/storage.md/

objectStorageConfigFile takes precedence over this field.

objectStorageConfigFile
string
(Optional)

objectStorageConfigFile defines the Thanos sidecar’s configuration file to upload TSDB blocks to object storage.

More info: https://thanos.io/tip/thanos/storage.md/

This field takes precedence over objectStorageConfig.

listenLocal
bool
(Optional)

listenLocal is deprecated: use grpcListenLocal and httpListenLocal instead.

grpcListenLocal
bool
(Optional)

grpcListenLocal defines when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP’s address for the gRPC endpoints.

It has no effect if listenLocal is true.

httpListenLocal
bool
(Optional)

httpListenLocal when true, the Thanos sidecar listens on the loopback interface instead of the Pod IP’s address for the HTTP endpoints.

It has no effect if listenLocal is true.

tracingConfig
Kubernetes core/v1.SecretKeySelector
(Optional)

tracingConfig defines the tracing configuration for the Thanos sidecar.

tracingConfigFile takes precedence over this field.

More info: https://thanos.io/tip/thanos/tracing.md/

This is an experimental feature, it may change in any upcoming release in a breaking way.

tracingConfigFile
string
(Optional)

tracingConfigFile defines the tracing configuration file for the Thanos sidecar.

This field takes precedence over tracingConfig.

More info: https://thanos.io/tip/thanos/tracing.md/

This is an experimental feature, it may change in any upcoming release in a breaking way.

grpcServerTlsConfig
TLSConfig
(Optional)

grpcServerTlsConfig defines the TLS parameters for the gRPC server providing the StoreAPI.

Note: Currently only the caFile, certFile, and keyFile fields are supported.

logLevel
string
(Optional)

logLevel for the Thanos sidecar.

logFormat
string
(Optional)

logFormat for the Thanos sidecar.

minTime
string
(Optional)

minTime defines the start of time range limit served by the Thanos sidecar’s StoreAPI. The field’s value should be a constant time in RFC3339 format or a time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y.

blockSize
Duration
(Optional)

blockSize controls the size of TSDB blocks produced by Prometheus. The default value is 2h to match the upstream Prometheus defaults.

WARNING: Changing the block duration can impact the performance and efficiency of the entire Prometheus/Thanos stack due to how it interacts with memory and Thanos compactors. It is recommended to keep this value set to a multiple of 120 times your longest scrape or rule interval. For example, 30s * 120 = 1h.

readyTimeout
Duration
(Optional)

readyTimeout defines the maximum time that the Thanos sidecar will wait for Prometheus to start.

getConfigInterval
Duration
(Optional)

getConfigInterval defines how often to retrieve the Prometheus configuration.

getConfigTimeout
Duration
(Optional)

getConfigTimeout defines the maximum time to wait when retrieving the Prometheus configuration.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts allows configuration of additional VolumeMounts for Thanos. VolumeMounts specified will be appended to other VolumeMounts in the ‘thanos-sidecar’ container.

additionalArgs
[]Argument
(Optional)

additionalArgs allows setting additional arguments for the Thanos container. The arguments are passed as-is to the Thanos container which may cause issues if they are invalid or not supported the given Thanos version. In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged.

TopologySpreadConstraint

(Appears on:CommonPrometheusFields)

Field Description
maxSkew
int32

MaxSkew describes the degree to which pods may be unevenly distributed. When whenUnsatisfiable=DoNotSchedule, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When whenUnsatisfiable=ScheduleAnyway, it is used to give higher precedence to topologies that satisfy it. It’s a required field. Default value is 1 and 0 is not allowed.

topologyKey
string

TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a “bucket”, and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is “kubernetes.io/hostname”, each Node is a domain of that topology. And, if TopologyKey is “topology.kubernetes.io/zone”, each zone is a domain of that topology. It’s a required field.

whenUnsatisfiable
Kubernetes core/v1.UnsatisfiableConstraintAction

WhenUnsatisfiable indicates how to deal with a pod if it doesn’t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered “Unsatisfiable” for an incoming pod if and only if every possible node assignment for that pod would violate “MaxSkew” on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won’t make it more imbalanced. It’s a required field.

labelSelector
Kubernetes meta/v1.LabelSelector
(Optional)

LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.

minDomains
int32
(Optional)

MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats “global minimum” as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won’t schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.

For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so “global minimum” is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew.

nodeAffinityPolicy
Kubernetes core/v1.NodeInclusionPolicy
(Optional)

NodeAffinityPolicy indicates how we will treat Pod’s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.

If this value is nil, the behavior is equivalent to the Honor policy.

nodeTaintsPolicy
Kubernetes core/v1.NodeInclusionPolicy
(Optional)

NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.

If this value is nil, the behavior is equivalent to the Ignore policy.

matchLabelKeys
[]string
(Optional)

MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn’t set. Keys that don’t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.

This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).

additionalLabelSelectors
AdditionalLabelSelectors
(Optional)

additionalLabelSelectors Defines what Prometheus Operator managed labels should be added to labelSelector on the topologySpreadConstraint.

TranslationStrategyOption (string alias)

(Appears on:OTLPConfig)

TranslationStrategyOption represents a translation strategy option for the OTLP endpoint. Supported values are: * NoUTF8EscapingWithSuffixes * UnderscoreEscapingWithSuffixes * UnderscoreEscapingWithoutSuffixes * NoTranslation

Value Description

"NoTranslation"

It requires Prometheus >= v3.4.0.

"NoUTF8EscapingWithSuffixes"

"UnderscoreEscapingWithSuffixes"

"UnderscoreEscapingWithoutSuffixes"

It requires Prometheus >= v3.6.0.

URL (string alias)

(Appears on:GlobalJiraConfig, GlobalRocketChatConfig, GlobalTelegramConfig, GlobalVictorOpsConfig, GlobalWeChatConfig, GlobalWebexConfig)

URL represents a valid URL

WebConfigFileFields

(Appears on:AlertmanagerWebSpec, PrometheusWebSpec, ThanosRulerWebSpec)

WebConfigFileFields defines the file content for –web.config.file flag.

Field Description
tlsConfig
WebTLSConfig
(Optional)

tlsConfig defines the TLS parameters for HTTPS.

httpConfig
WebHTTPConfig
(Optional)

httpConfig defines HTTP parameters for web server.

WebHTTPConfig

(Appears on:WebConfigFileFields)

WebHTTPConfig defines HTTP parameters for web server.

Field Description
http2
bool
(Optional)

http2 enable HTTP/2 support. Note that HTTP/2 is only supported with TLS. When TLSConfig is not configured, HTTP/2 will be disabled. Whenever the value of the field changes, a rolling update will be triggered.

headers
WebHTTPHeaders
(Optional)

headers defines a list of headers that can be added to HTTP responses.

WebHTTPHeaders

(Appears on:WebHTTPConfig)

WebHTTPHeaders defines the list of headers that can be added to HTTP responses.

Field Description
contentSecurityPolicy
string
(Optional)

contentSecurityPolicy defines the Content-Security-Policy header to HTTP responses. Unset if blank.

xFrameOptions
string
(Optional)

xFrameOptions defines the X-Frame-Options header to HTTP responses. Unset if blank. Accepted values are deny and sameorigin. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

xContentTypeOptions
string
(Optional)

xContentTypeOptions defines the X-Content-Type-Options header to HTTP responses. Unset if blank. Accepted value is nosniff. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options

xXSSProtection
string
(Optional)

xXSSProtection defines the X-XSS-Protection header to all responses. Unset if blank. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection

strictTransportSecurity
string
(Optional)

strictTransportSecurity defines the Strict-Transport-Security header to HTTP responses. Unset if blank. Please make sure that you use this with care as this header might force browsers to load Prometheus and the other applications hosted on the same domain and subdomains over HTTPS. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security

WebTLSConfig

(Appears on:ClusterTLSConfig, WebConfigFileFields)

WebTLSConfig defines the TLS parameters for HTTPS.

Field Description
cert
SecretOrConfigMap
(Optional)

cert defines the Secret or ConfigMap containing the TLS certificate for the web server.

Either keySecret or keyFile must be defined.

It is mutually exclusive with certFile.

certFile
string
(Optional)

certFile defines the path to the TLS certificate file in the container for the web server.

Either keySecret or keyFile must be defined.

It is mutually exclusive with cert.

keySecret
Kubernetes core/v1.SecretKeySelector
(Optional)

keySecret defines the secret containing the TLS private key for the web server.

Either cert or certFile must be defined.

It is mutually exclusive with keyFile.

keyFile
string
(Optional)

keyFile defines the path to the TLS private key file in the container for the web server.

If defined, either cert or certFile must be defined.

It is mutually exclusive with keySecret.

client_ca
SecretOrConfigMap
(Optional)

client_ca defines the Secret or ConfigMap containing the CA certificate for client certificate authentication to the server.

It is mutually exclusive with clientCAFile.

clientCAFile
string
(Optional)

clientCAFile defines the path to the CA certificate file for client certificate authentication to the server.

It is mutually exclusive with client_ca.

clientAuthType
string
(Optional)

clientAuthType defines the server policy for client TLS authentication.

For more detail on clientAuth options: https://golang.org/pkg/crypto/tls/#ClientAuthType

minVersion
string
(Optional)

minVersion defines the minimum TLS version that is acceptable.

maxVersion
string
(Optional)

maxVersion defines the Maximum TLS version that is acceptable.

cipherSuites
[]string
(Optional)

cipherSuites defines the list of supported cipher suites for TLS versions up to TLS 1.2.

If not defined, the Go default cipher suites are used. Available cipher suites are documented in the Go documentation: https://golang.org/pkg/crypto/tls/#pkg-constants

preferServerCipherSuites
bool
(Optional)

preferServerCipherSuites defines whether the server selects the client’s most preferred cipher suite, or the server’s most preferred cipher suite.

If true then the server’s preference, as expressed in the order of elements in cipherSuites, is used.

curvePreferences
[]string
(Optional)

curvePreferences defines elliptic curves that will be used in an ECDHE handshake, in preference order.

Available curves are documented in the Go documentation: https://golang.org/pkg/crypto/tls/#CurveID

WhenScaledRetentionType (string alias)

(Appears on:ShardRetentionPolicy)

WorkloadBinding

(Appears on:ConfigResourceStatus)

WorkloadBinding is a link between a configuration resource and a workload resource.

Field Description
group
string

group defines the group of the referenced resource.

resource
string

resource defines the type of resource being referenced (e.g. Prometheus or PrometheusAgent).

name
string

name defines the name of the referenced object.

namespace
string

namespace defines the namespace of the referenced object.

conditions
[]ConfigResourceCondition
(Optional)

conditions defines the current state of the configuration resource when bound to the referenced Prometheus object.


monitoring.coreos.com/v1alpha1

Resource Types:

AlertmanagerConfig

AlertmanagerConfig configures the Prometheus Alertmanager, specifying how alerts should be grouped, inhibited and notified to external systems.

Field Description
apiVersion
string
monitoring.coreos.com/v1alpha1
kind
string
AlertmanagerConfig
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
AlertmanagerConfigSpec

spec defines the specification of AlertmanagerConfigSpec



route
Route
(Optional)

route defines the Alertmanager route definition for alerts matching the resource’s namespace. If present, it will be added to the generated Alertmanager configuration as a first-level route.

receivers
[]Receiver
(Optional)

receivers defines the list of receivers.

inhibitRules
[]InhibitRule
(Optional)

inhibitRules defines the list of inhibition rules. The rules will only apply to alerts matching the resource’s namespace.

muteTimeIntervals
[]MuteTimeInterval
(Optional)

muteTimeIntervals defines the list of MuteTimeInterval specifying when the routes should be muted.

PrometheusAgent

The PrometheusAgent custom resource definition (CRD) defines a desired Prometheus Agent setup to run in a Kubernetes cluster.

The CRD is very similar to the Prometheus CRD except for features which aren’t available in agent mode like rule evaluation, persistent storage and Thanos sidecar.

Field Description
apiVersion
string
monitoring.coreos.com/v1alpha1
kind
string
PrometheusAgent
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
PrometheusAgentSpec

spec defines the specification of the desired behavior of the Prometheus agent. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status



mode
PrometheusAgentMode
(Optional)

mode defines how the Prometheus operator deploys the PrometheusAgent pod(s).

(Alpha) Using this field requires the PrometheusAgentDaemonSet feature gate to be enabled.

podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the Prometheus pods.

The following items are reserved and cannot be overridden: * “prometheus” label, set to the name of the Prometheus object. * “app.kubernetes.io/instance” label, set to the name of the Prometheus object. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/name” label, set to “prometheus”. * “app.kubernetes.io/version” label, set to the Prometheus version. * “operator.prometheus.io/name” label, set to the name of the Prometheus object. * “operator.prometheus.io/shard” label, set to the shard number of the Prometheus object. * “kubectl.kubernetes.io/default-container” annotation, set to “prometheus”.

serviceMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorSelector defines the serviceMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

serviceMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorNamespaceSelector defines the namespaces to match for ServicedMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

podMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorSelector defines the podMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

podMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorNamespaceSelector defines the namespaces to match for PodMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

probeSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeSelector defines the probes to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

probeNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeNamespaceSelector defines the namespaces to match for Probe discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

scrapeConfigSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigSelector defines the scrapeConfigs to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

scrapeConfigNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigNamespaceSelector defines the namespaces to match for ScrapeConfig discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

version
string
(Optional)

version of Prometheus being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.

If not specified, the operator assumes the latest upstream version of Prometheus available at the time when the version of the operator was released.

paused
bool
(Optional)

paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.

image
string
(Optional)

image defines the container image name for Prometheus. If specified, it takes precedence over the spec.baseImage, spec.tag and spec.sha fields.

Specifying spec.version is still necessary to ensure the Prometheus Operator knows which version of Prometheus is being configured.

If neither spec.image nor spec.baseImage are defined, the operator will use the latest upstream version of Prometheus available at the time when the operator was released.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy defines the image pull policy for the ‘prometheus’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

replicas
int32
(Optional)

replicas defines the number of replicas of each shard to deploy for a Prometheus deployment. spec.replicas multiplied by spec.shards is the total number of Pods created.

Default: 1

shards
int32
(Optional)

shards defines the number of shards to distribute the scraped targets onto.

spec.replicas multiplied by spec.shards is the total number of Pods being created.

When not defined, the operator assumes only one shard.

Note that scaling down shards will not reshard data onto the remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally, use either * Thanos sidecar + querier for query federation and Thanos Ruler for rules. * Remote-write to send metrics to a central location.

By default, the sharding of targets is performed on: * The __address__ target’s metadata label for PodMonitor, ServiceMonitor and ScrapeConfig resources. * The __param_target__ label for Probe resources.

Users can define their own sharding implementation by setting the __tmp_hash label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class).

You can also disable sharding on a specific target by setting the __tmp_disable_sharding label with relabeling configuration. When the label value isn’t empty, all Prometheus shards will scrape the target.

replicaExternalLabelName
string
(Optional)

replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus_replica”

prometheusExternalLabelName
string
(Optional)

prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus”

logLevel
string
(Optional)

logLevel for Prometheus and the config-reloader sidecar.

logFormat
string
(Optional)

logFormat for Log level for Prometheus and the config-reloader sidecar.

scrapeInterval
Duration
(Optional)

scrapeInterval defines interval between consecutive scrapes.

Default: “30s”

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

PrometheusText1.0.0 requires Prometheus >= v3.0.0.

externalLabels
map[string]string
(Optional)

externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). Labels defined by spec.replicaExternalLabelName and spec.prometheusExternalLabelName take precedence over this list.

enableRemoteWriteReceiver
bool
(Optional)

enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.

WARNING: This is not considered an efficient way of ingesting samples. Use it with caution for specific low-volume use cases. It is not suitable for replacing the ingestion via scraping and turning Prometheus into a push-based metrics collection system. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver

It requires Prometheus >= v2.33.0.

enableOTLPReceiver
bool
(Optional)

enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.

Note that the OTLP receiver endpoint is automatically enabled if .spec.otlpConfig is defined.

It requires Prometheus >= v2.47.0.

remoteWriteReceiverMessageVersions
[]RemoteWriteMessageVersion
(Optional)

remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.

It requires Prometheus >= v2.54.0.

enableFeatures
[]EnableFeature
(Optional)

enableFeatures enables access to Prometheus feature flags. By default, no features are enabled.

Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/

externalUrl
string
(Optional)

externalUrl defines the external URL under which the Prometheus service is externally available. This is necessary to generate correct URLs (for instance if Prometheus is accessible behind an Ingress resource).

routePrefix
string
(Optional)

routePrefix defines the route prefix Prometheus registers HTTP handlers for.

This is useful when using spec.externalURL, and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with kubectl proxy.

storage
StorageSpec
(Optional)

storage defines the storage used by Prometheus.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes allows the configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts allows the configuration of additional VolumeMounts.

VolumeMounts will be appended to other VolumeMounts in the ‘prometheus’ container, that are generated as a result of StorageSpec objects.

persistentVolumeClaimRetentionPolicy
Kubernetes apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy
(Optional)

persistentVolumeClaimRetentionPolicy defines the field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is an alpha field from kubernetes 1.23 until 1.26 and a beta field from 1.26. It requires enabling the StatefulSetAutoDeletePVC feature gate.

web
PrometheusWebSpec
(Optional)

web defines the configuration of the Prometheus web server.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resources requests and limits of the ‘prometheus’ container.

nodeSelector
map[string]string
(Optional)

nodeSelector defines on which Nodes the Pods are scheduled.

serviceAccountName
string
(Optional)

serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.

automountServiceAccountToken
bool
(Optional)

automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the field isn’t 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.

secrets
[]string
(Optional)

secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each Secret is added to the StatefulSet definition as a volume named secret-<secret-name>. The Secrets are mounted into /etc/prometheus/secrets/ in the ‘prometheus’ container.

configMaps
[]string
(Optional)

configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each ConfigMap is added to the StatefulSet definition as a volume named configmap-<configmap-name>. The ConfigMaps are mounted into /etc/prometheus/configmaps/ in the ‘prometheus’ container.

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines the Pods’ affinity scheduling rules if specified.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines the Pods’ tolerations if specified.

topologySpreadConstraints
[]TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the pod’s topology spread constraints if specified.

remoteWrite
[]RemoteWriteSpec
(Optional)

remoteWrite defines the list of remote write configurations.

otlp
OTLPConfig
(Optional)

otlp defines the settings related to the OTLP receiver feature. It requires Prometheus >= v2.55.0.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines the DNS configuration for the pods.

listenLocal
bool
(Optional)

listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP’s address.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch.

The names of containers managed by the operator are: * prometheus * config-reloader * thanos-sidecar

Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.

The names of init container name managed by the operator are: * init-config-reloader.

Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

additionalScrapeConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalScrapeConfigs allows specifying a key of a Secret containing additional Prometheus scrape configurations. Scrape configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible scrape configs are going to break Prometheus after the upgrade.

apiserverConfig
APIServerConfig
(Optional)

apiserverConfig allows specifying a host and auth methods to access the Kuberntees API server. If null, Prometheus is assumed to run inside of the cluster: it will discover the API servers automatically and use the Pod’s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.

priorityClassName
string
(Optional)

priorityClassName assigned to the Pods.

portName
string
(Optional)

portName used for the pods and governing service. Default: “web”

arbitraryFSAccessThroughSMs
ArbitraryFSAccessThroughSMsConfig
(Optional)

arbitraryFSAccessThroughSMs when true, ServiceMonitor, PodMonitor and Probe object are forbidden to reference arbitrary files on the file system of the ‘prometheus’ container. When a ServiceMonitor’s endpoint specifies a bearerTokenFile value (e.g. ‘/var/run/secrets/kubernetes.io/serviceaccount/token’), a malicious target can get access to the Prometheus service account’s token in the Prometheus’ scrape request. Setting spec.arbitraryFSAccessThroughSM to ‘true’ would prevent the attack. Users should instead provide the credentials using the spec.bearerTokenSecret field.

overrideHonorLabels
bool
(Optional)

overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped data to “exported_” for all targets created from ServiceMonitor, PodMonitor and ScrapeConfig objects. Otherwise the HonorLabels field of the service or pod monitor applies. In practice,OverrideHonorLabels:true enforces honorLabels:false for all ServiceMonitor, PodMonitor and ScrapeConfig objects.

overrideHonorTimestamps
bool
(Optional)

overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors. Otherwise the HonorTimestamps field of the service or pod monitor applies.

ignoreNamespaceSelectors
bool
(Optional)

ignoreNamespaceSelectors when true, spec.namespaceSelector from all PodMonitor, ServiceMonitor and Probe objects will be ignored. They will only discover targets within the namespace of the PodMonitor, ServiceMonitor and Probe object.

enforcedNamespaceLabel
string
(Optional)

enforcedNamespaceLabel when not empty, a label will be added to:

  1. All metrics scraped from ServiceMonitor, PodMonitor, Probe and ScrapeConfig objects.
  2. All metrics generated from recording rules defined in PrometheusRule objects.
  3. All alerts generated from alerting rules defined in PrometheusRule objects.
  4. All vector selectors of PromQL expressions defined in PrometheusRule objects.

The label will not added for objects referenced in spec.excludedFromEnforcement.

The label’s name is this field’s value. The label’s value is the namespace of the ServiceMonitor, PodMonitor, Probe, PrometheusRule or ScrapeConfig object.

enforcedSampleLimit
uint64
(Optional)

enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted. This overrides any spec.sampleLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.sampleLimit is greater than zero and less than spec.enforcedSampleLimit.

It is meant to be used by admins to keep the overall number of samples/series under a desired limit.

When both enforcedSampleLimit and sampleLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined sampleLimit value will inherit the global sampleLimit value (Prometheus >= 2.45.0) or the enforcedSampleLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedSampleLimit is greater than the sampleLimit, the sampleLimit will be set to enforcedSampleLimit. * Scrape objects with a sampleLimit value less than or equal to enforcedSampleLimit keep their specific value. * Scrape objects with a sampleLimit value greater than enforcedSampleLimit are set to enforcedSampleLimit.

enforcedTargetLimit
uint64
(Optional)

enforcedTargetLimit when defined specifies a global limit on the number of scraped targets. The value overrides any spec.targetLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.targetLimit is greater than zero and less than spec.enforcedTargetLimit.

It is meant to be used by admins to to keep the overall number of targets under a desired limit.

When both enforcedTargetLimit and targetLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined targetLimit value will inherit the global targetLimit value (Prometheus >= 2.45.0) or the enforcedTargetLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedTargetLimit is greater than the targetLimit, the targetLimit will be set to enforcedTargetLimit. * Scrape objects with a targetLimit value less than or equal to enforcedTargetLimit keep their specific value. * Scrape objects with a targetLimit value greater than enforcedTargetLimit are set to enforcedTargetLimit.

enforcedLabelLimit
uint64
(Optional)

enforcedLabelLimit when defined specifies a global limit on the number of labels per sample. The value overrides any spec.labelLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelLimit is greater than zero and less than spec.enforcedLabelLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelLimit and labelLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelLimit value will inherit the global labelLimit value (Prometheus >= 2.45.0) or the enforcedLabelLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelLimit is greater than the labelLimit, the labelLimit will be set to enforcedLabelLimit. * Scrape objects with a labelLimit value less than or equal to enforcedLabelLimit keep their specific value. * Scrape objects with a labelLimit value greater than enforcedLabelLimit are set to enforcedLabelLimit.

enforcedLabelNameLengthLimit
uint64
(Optional)

enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample. The value overrides any spec.labelNameLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelNameLengthLimit is greater than zero and less than spec.enforcedLabelNameLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelNameLengthLimit and labelNameLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelNameLengthLimit value will inherit the global labelNameLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelNameLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelNameLengthLimit is greater than the labelNameLengthLimit, the labelNameLengthLimit will be set to enforcedLabelNameLengthLimit. * Scrape objects with a labelNameLengthLimit value less than or equal to enforcedLabelNameLengthLimit keep their specific value. * Scrape objects with a labelNameLengthLimit value greater than enforcedLabelNameLengthLimit are set to enforcedLabelNameLengthLimit.

enforcedLabelValueLengthLimit
uint64
(Optional)

enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample. The value overrides any spec.labelValueLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelValueLengthLimit is greater than zero and less than spec.enforcedLabelValueLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelValueLengthLimit and labelValueLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelValueLengthLimit value will inherit the global labelValueLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelValueLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelValueLengthLimit is greater than the labelValueLengthLimit, the labelValueLengthLimit will be set to enforcedLabelValueLengthLimit. * Scrape objects with a labelValueLengthLimit value less than or equal to enforcedLabelValueLengthLimit keep their specific value. * Scrape objects with a labelValueLengthLimit value greater than enforcedLabelValueLengthLimit are set to enforcedLabelValueLengthLimit.

enforcedKeepDroppedTargets
uint64
(Optional)

enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory. The value overrides any spec.keepDroppedTargets set by ServiceMonitor, PodMonitor, Probe objects unless spec.keepDroppedTargets is greater than zero and less than spec.enforcedKeepDroppedTargets.

It requires Prometheus >= v2.47.0.

When both enforcedKeepDroppedTargets and keepDroppedTargets are defined and greater than zero, the following rules apply: * Scrape objects without a defined keepDroppedTargets value will inherit the global keepDroppedTargets value (Prometheus >= 2.45.0) or the enforcedKeepDroppedTargets value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedKeepDroppedTargets is greater than the keepDroppedTargets, the keepDroppedTargets will be set to enforcedKeepDroppedTargets. * Scrape objects with a keepDroppedTargets value less than or equal to enforcedKeepDroppedTargets keep their specific value. * Scrape objects with a keepDroppedTargets value greater than enforcedKeepDroppedTargets are set to enforcedKeepDroppedTargets.

enforcedBodySizeLimit
ByteSize
(Optional)

enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus. Targets responding with a body larger than this many bytes will cause the scrape to fail.

It requires Prometheus >= v2.28.0.

When both enforcedBodySizeLimit and bodySizeLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined bodySizeLimit value will inherit the global bodySizeLimit value (Prometheus >= 2.45.0) or the enforcedBodySizeLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedBodySizeLimit is greater than the bodySizeLimit, the bodySizeLimit will be set to enforcedBodySizeLimit. * Scrape objects with a bodySizeLimit value less than or equal to enforcedBodySizeLimit keep their specific value. * Scrape objects with a bodySizeLimit value greater than enforcedBodySizeLimit are set to enforcedBodySizeLimit.

nameValidationScheme
NameValidationSchemeOptions
(Optional)

nameValidationScheme defines the validation scheme for metric and label names.

It requires Prometheus >= v2.55.0.

nameEscapingScheme
NameEscapingSchemeOptions
(Optional)

nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.

It requires Prometheus >= v3.4.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.

It requires Prometheus >= v3.4.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

It requires Prometheus >= v3.5.0.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created Pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

hostAliases
[]HostAlias
(Optional)

hostAliases defines the optional list of hosts and IPs that will be injected into the Pod’s hosts file if specified.

additionalArgs
[]Argument
(Optional)

additionalArgs allows setting additional arguments for the ‘prometheus’ container.

It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the Prometheus container which may cause issues if they are invalid or not supported by the given Prometheus version.

In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged.

walCompression
bool
(Optional)

walCompression defines the compression of the write-ahead log (WAL) using Snappy.

WAL compression is enabled by default for Prometheus >= 2.20.0

Requires Prometheus v2.11.0 and above.

excludedFromEnforcement
[]ObjectReference
(Optional)

excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.

It is only applicable if spec.enforcedNamespaceLabel set to true.

hostNetwork
bool
(Optional)

hostNetwork defines the host’s network namespace if true.

Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/ ).

When hostNetwork is enabled, this will set the DNS policy to ClusterFirstWithHostNet automatically (unless .spec.DNSPolicy is set to a different value).

podTargetLabels
[]string
(Optional)

podTargetLabels are appended to the spec.podTargetLabels field of all PodMonitor and ServiceMonitor objects.

tracingConfig
PrometheusTracingConfig
(Optional)

tracingConfig defines tracing in Prometheus.

This is an experimental feature, it may change in any upcoming release in a breaking way.

bodySizeLimit
ByteSize
(Optional)

bodySizeLimit defines per-scrape on response body size. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedBodySizeLimit.

sampleLimit
uint64
(Optional)

sampleLimit defines per-scrape limit on number of scraped samples that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedSampleLimit.

targetLimit
uint64
(Optional)

targetLimit defines a limit on the number of scraped targets that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedTargetLimit.

labelLimit
uint64
(Optional)

labelLimit defines per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelLimit.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelNameLengthLimit.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelValueLengthLimit.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedKeepDroppedTargets.

reloadStrategy
ReloadStrategyType
(Optional)

reloadStrategy defines the strategy used to reload the Prometheus configuration. If not specified, the configuration is reloaded using the /-/reload HTTP endpoint.

maximumStartupDurationSeconds
int32
(Optional)

maximumStartupDurationSeconds defines the maximum time that the prometheus container’s startup probe will wait before being considered failed. The startup probe will return 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 minutes).

scrapeClasses
[]ScrapeClass
(Optional)

scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.

This is an experimental feature, it may change in any upcoming release in a breaking way.

serviceDiscoveryRole
ServiceDiscoveryRole
(Optional)

serviceDiscoveryRole defines the service discovery role used to discover targets from ServiceMonitor objects and Alertmanager endpoints.

If set, the value should be either “Endpoints” or “EndpointSlice”. If unset, the operator assumes the “Endpoints” role.

tsdb
TSDBSpec
(Optional)

tsdb defines the runtime reloadable configuration of the timeseries database(TSDB). It requires Prometheus >= v2.39.0 or PrometheusAgent >= v2.54.0.

scrapeFailureLogFile
string
(Optional)

scrapeFailureLogFile defines the file to which scrape failures are logged. Reloading the configuration will reopen the file.

If the filename has an empty path, e.g. ‘file.log’, The Prometheus Pods will mount the file into an emptyDir volume at /var/log/prometheus. If a full path is provided, e.g. ‘/var/log/prometheus/file.log’, you must mount a volume in the specified directory and it must be writable. It requires Prometheus >= v2.55.0.

serviceName
string
(Optional)

serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the Prometheus/PrometheusAgent resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named prometheus-operated for Prometheus resources, or prometheus-agent-operated for PrometheusAgent resources. When deploying multiple Prometheus/PrometheusAgent resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

runtime
RuntimeConfig
(Optional)

runtime defines the values for the Prometheus process behavior

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 600 seconds.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

status
PrometheusStatus
(Optional)

status defines the most recent observed status of the Prometheus cluster. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

ScrapeConfig

ScrapeConfig defines a namespaced Prometheus scrape_config to be aggregated across multiple namespaces into the Prometheus configuration.

Field Description
apiVersion
string
monitoring.coreos.com/v1alpha1
kind
string
ScrapeConfig
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
ScrapeConfigSpec

spec defines the specification of ScrapeConfigSpec.



jobName
string
(Optional)

jobName defines the value of the job label assigned to the scraped metrics by default.

The job_name field in the rendered scrape configuration is always controlled by the operator to prevent duplicate job names, which Prometheus does not allow. Instead the job label is set by means of relabeling configs.

staticConfigs
[]StaticConfig
(Optional)

staticConfigs defines a list of static targets with a common label set.

fileSDConfigs
[]FileSDConfig
(Optional)

fileSDConfigs defines a list of file service discovery configurations.

httpSDConfigs
[]HTTPSDConfig
(Optional)

httpSDConfigs defines a list of HTTP service discovery configurations.

kubernetesSDConfigs
[]KubernetesSDConfig
(Optional)

kubernetesSDConfigs defines a list of Kubernetes service discovery configurations.

consulSDConfigs
[]ConsulSDConfig
(Optional)

consulSDConfigs defines a list of Consul service discovery configurations.

dnsSDConfigs
[]DNSSDConfig
(Optional)

dnsSDConfigs defines a list of DNS service discovery configurations.

ec2SDConfigs
[]EC2SDConfig
(Optional)

ec2SDConfigs defines a list of EC2 service discovery configurations.

azureSDConfigs
[]AzureSDConfig
(Optional)

azureSDConfigs defines a list of Azure service discovery configurations.

gceSDConfigs
[]GCESDConfig
(Optional)

gceSDConfigs defines a list of GCE service discovery configurations.

openstackSDConfigs
[]OpenStackSDConfig
(Optional)

openstackSDConfigs defines a list of OpenStack service discovery configurations.

digitalOceanSDConfigs
[]DigitalOceanSDConfig
(Optional)

digitalOceanSDConfigs defines a list of DigitalOcean service discovery configurations.

kumaSDConfigs
[]KumaSDConfig
(Optional)

kumaSDConfigs defines a list of Kuma service discovery configurations.

eurekaSDConfigs
[]EurekaSDConfig
(Optional)

eurekaSDConfigs defines a list of Eureka service discovery configurations.

dockerSDConfigs
[]DockerSDConfig
(Optional)

dockerSDConfigs defines a list of Docker service discovery configurations.

linodeSDConfigs
[]LinodeSDConfig
(Optional)

linodeSDConfigs defines a list of Linode service discovery configurations.

hetznerSDConfigs
[]HetznerSDConfig
(Optional)

hetznerSDConfigs defines a list of Hetzner service discovery configurations.

nomadSDConfigs
[]NomadSDConfig
(Optional)

nomadSDConfigs defines a list of Nomad service discovery configurations.

dockerSwarmSDConfigs
[]DockerSwarmSDConfig
(Optional)

dockerSwarmSDConfigs defines a list of Dockerswarm service discovery configurations.

puppetDBSDConfigs
[]PuppetDBSDConfig
(Optional)

puppetDBSDConfigs defines a list of PuppetDB service discovery configurations.

lightSailSDConfigs
[]LightSailSDConfig
(Optional)

lightSailSDConfigs defines a list of Lightsail service discovery configurations.

ovhcloudSDConfigs
[]OVHCloudSDConfig
(Optional)

ovhcloudSDConfigs defines a list of OVHcloud service discovery configurations.

scalewaySDConfigs
[]ScalewaySDConfig
(Optional)

scalewaySDConfigs defines a list of Scaleway instances and baremetal service discovery configurations.

ionosSDConfigs
[]IonosSDConfig
(Optional)

ionosSDConfigs defines a list of IONOS service discovery configurations.

relabelings
[]RelabelConfig
(Optional)

relabelings defines how to rewrite the target’s labels before scraping. Prometheus 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

metricsPath
string
(Optional)

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

scrapeInterval
Duration
(Optional)

scrapeInterval defines the interval between consecutive scrapes.

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.

It requires Prometheus >= v3.0.0.

honorTimestamps
bool
(Optional)

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

trackTimestampsStaleness
bool
(Optional)

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.

honorLabels
bool
(Optional)

honorLabels defines when true the metric’s labels when they collide with the target’s labels.

params
map[string][]string
(Optional)

params defines optional HTTP URL parameters

scheme
string
(Optional)

scheme defines the protocol scheme used for requests. If empty, Prometheus uses HTTP by default.

enableCompression
bool
(Optional)

enableCompression when false, Prometheus will request uncompressed response from the scraped target.

It requires Prometheus >= v2.49.0.

If unset, Prometheus uses true by default.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request.

authorization
SafeAuthorization
(Optional)

authorization defines the header to use on every scrape request.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to use on every scrape request

sampleLimit
uint64
(Optional)

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

targetLimit
uint64
(Optional)

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

labelLimit
uint64
(Optional)

labelLimit defines the 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
uint64
(Optional)

labelNameLengthLimit defines the 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
uint64
(Optional)

labelValueLengthLimit defines the 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.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

metricRelabelings
[]RelabelConfig
(Optional)

metricRelabelings defines the metricRelabelings to apply to samples before ingestion.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

nameValidationScheme
NameValidationSchemeOptions
(Optional)

nameValidationScheme defines the validation scheme for metric and label names.

It requires Prometheus >= v3.0.0.

nameEscapingScheme
NameEscapingSchemeOptions
(Optional)

nameEscapingScheme defines the metric name escaping mode to request through content negotiation.

It requires Prometheus >= v3.4.0.

scrapeClass
string
(Optional)

scrapeClass defines the scrape class to apply.

AlertmanagerConfigSpec

(Appears on:AlertmanagerConfig)

AlertmanagerConfigSpec is a specification of the desired behavior of the Alertmanager configuration. By default, the Alertmanager configuration only applies to alerts for which the namespace label is equal to the namespace of the AlertmanagerConfig resource (see the .spec.alertmanagerConfigMatcherStrategy field of the Alertmanager CRD).

Field Description
route
Route
(Optional)

route defines the Alertmanager route definition for alerts matching the resource’s namespace. If present, it will be added to the generated Alertmanager configuration as a first-level route.

receivers
[]Receiver
(Optional)

receivers defines the list of receivers.

inhibitRules
[]InhibitRule
(Optional)

inhibitRules defines the list of inhibition rules. The rules will only apply to alerts matching the resource’s namespace.

muteTimeIntervals
[]MuteTimeInterval
(Optional)

muteTimeIntervals defines the list of MuteTimeInterval specifying when the routes should be muted.

AttachMetadata

(Appears on:KubernetesSDConfig)

Field Description
node
bool
(Optional)

node attaches node metadata to discovered targets. When set to true, Prometheus must have the get permission on the Nodes objects. Only valid for Pod, Endpoint and Endpointslice roles.

AuthenticationMethodType (string alias)

(Appears on:AzureSDConfig)

Value Description

"ManagedIdentity"

"OAuth"

"SDK"

AzureSDConfig

(Appears on:ScrapeConfigSpec)

AzureSDConfig allow retrieving scrape targets from Azure VMs. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#azure_sd_config

Field Description
environment
string
(Optional)

environment defines the Azure environment.

authenticationMethod
AuthenticationMethodType
(Optional)

authenticationMethod defines the authentication method, either OAuth or ManagedIdentity or SDK. See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview SDK authentication method uses environment variables by default. See https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication

subscriptionID
string

subscriptionID defines subscription ID. Always required.

tenantID
string
(Optional)

tenantID defines tenant ID. Only required with the OAuth authentication method.

clientID
string
(Optional)

clientID defines client ID. Only required with the OAuth authentication method.

clientSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

clientSecret defines client secret. Only required with the OAuth authentication method.

resourceGroup
string
(Optional)

resourceGroup defines resource group name. Limits discovery to this resource group. Requires Prometheus v2.35.0 and above

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.

basicAuth
BasicAuth
(Optional)

basicAuth defines the information to authenticate against the target HTTP endpoint. More info: https://prometheus.io/docs/operating/configuration/#endpoints Cannot be set at the same time as authorization, or oAuth2.

authorization
SafeAuthorization
(Optional)

authorization defines the authorization header configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as oAuth2, or basicAuth.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defies the TLS configuration applying to the target HTTP endpoint.

ConsulSDConfig

(Appears on:ScrapeConfigSpec)

ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config

Field Description
server
string

server defines the consul server address. A valid string consisting of a hostname or IP followed by an optional port number.

pathPrefix
string
(Optional)

pathPrefix defines the prefix for URIs for when consul is behind an API gateway (reverse proxy).

It requires Prometheus >= 2.45.0.

tokenRef
Kubernetes core/v1.SecretKeySelector
(Optional)

tokenRef defines the consul ACL TokenRef, if not provided it will use the ACL from the local Consul Agent.

datacenter
string
(Optional)

datacenter defines the consul Datacenter name, if not provided it will use the local Consul Agent Datacenter.

namespace
string
(Optional)

namespace are only supported in Consul Enterprise.

It requires Prometheus >= 2.28.0.

partition
string
(Optional)

partition defines the admin Partitions are only supported in Consul Enterprise.

scheme
string
(Optional)

scheme defines the HTTP Scheme default “http”

services
[]string
(Optional)

services defines a list of services for which targets are retrieved. If omitted, all services are scraped.

tags
[]string
(Optional)

tags defines an optional list of tags used to filter nodes for a given service. Services must contain all tags in the list. Starting with Consul 1.14, it is recommended to use filter with the ServiceTags selector instead.

tagSeparator
string
(Optional)

tagSeparator defines the string by which Consul tags are joined into the tag label. If unset, Prometheus uses its default value.

nodeMeta
map[string]string
(Optional)

nodeMeta defines the node metadata key/value pairs to filter nodes for a given service. Starting with Consul 1.14, it is recommended to use filter with the NodeMeta selector instead.

filter
string
(Optional)

filter defines the filter expression used to filter the catalog results. See https://www.consul.io/api-docs/catalog#list-services It requires Prometheus >= 3.0.0.

allowStale
bool
(Optional)

allowStale Consul results (see https://www.consul.io/api/features/consistency.html). Will reduce load on Consul. If unset, Prometheus uses its default value.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

basicAuth
BasicAuth
(Optional)

basicAuth defines the information to authenticate against the Consul Server. More info: https://prometheus.io/docs/operating/configuration/#endpoints Cannot be set at the same time as authorization, or oauth2.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the Consul Server. Cannot be set at the same time as basicAuth, or oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the optional OAuth 2.0 configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as authorization, or basicAuth.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

DNSRecordType (string alias)

(Appears on:DNSSDConfig)

Value Description

"A"

"AAAA"

"MX"

"NS"

"SRV"

DNSSDConfig

(Appears on:ScrapeConfigSpec)

DNSSDConfig allows specifying a set of DNS domain names which are periodically queried to discover a list of targets. The DNS servers to be contacted are read from /etc/resolv.conf. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config

Field Description
names
[]string

names defines a list of DNS domain names to be queried.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

type
DNSRecordType
(Optional)

type defines the type of DNS query to perform. One of SRV, A, AAAA, MX or NS. If not set, Prometheus uses its default value.

When set to NS, it requires Prometheus >= v2.49.0. When set to MX, it requires Prometheus >= v2.38.0

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must Ignored for SRV records

DayOfMonthRange

(Appears on:TimeInterval)

DayOfMonthRange is an inclusive range of days of the month beginning at 1

Field Description
start
int
(Optional)

start of the inclusive range

end
int
(Optional)

end of the inclusive range

DigitalOceanSDConfig

(Appears on:ScrapeConfigSpec)

DigitalOceanSDConfig allow retrieving scrape targets from DigitalOcean’s Droplets API. This service discovery uses the public IPv4 address by default, by that can be changed with relabeling See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#digitalocean_sd_config

Field Description
authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

DiscordConfig

(Appears on:Receiver)

DiscordConfig configures notifications via Discord. See https://prometheus.io/docs/alerting/latest/configuration/#discord_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
Kubernetes core/v1.SecretKeySelector

apiURL defines the secret’s key that contains the Discord webhook URL. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

title
string
(Optional)

title defines the template of the message’s title.

message
string
(Optional)

message defines the template of the message’s body.

content
string
(Optional)

content defines the template of the content’s body.

username
string
(Optional)

username defines the username of the message sender.

avatarURL
URL
(Optional)

avatarURL defines the avatar url of the message sender.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration.

DockerSDConfig

(Appears on:ScrapeConfigSpec)

Docker SD configurations allow retrieving scrape targets from Docker Engine hosts. This SD discovers “containers” and will create a target for each network IP and port the container is configured to expose. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#docker_sd_config

Field Description
host
string

host defines the address of the docker daemon

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

tlsConfig
SafeTLSConfig

tlsConfig defines the TLS configuration to connect to the Consul API.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must

hostNetworkingHost
string
(Optional)

hostNetworkingHost defines the host to use if the container is in host networking mode.

matchFirstNetwork
bool
(Optional)

matchFirstNetwork defines whether to match the first network if the container has multiple networks defined. If unset, Prometheus uses true by default. It requires Prometheus >= v2.54.1.

filters
Filters
(Optional)

filters defines filters to limit the discovery process to a subset of the available resources.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

DockerSwarmSDConfig

(Appears on:ScrapeConfigSpec)

DockerSwarmSDConfig configurations allow retrieving scrape targets from Docker Swarm engine. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dockerswarm_sd_config

Field Description
host
string

host defines the address of the Docker daemon

role
string

role of the targets to retrieve. Must be Services, Tasks, or Nodes.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must tasks and services that don’t have published ports.

filters
Filters
(Optional)

filters defines the filters to limit the discovery process to a subset of available resources. The available filters are listed in the upstream documentation: Services: https://docs.docker.com/engine/api/v1.40/#operation/ServiceList Tasks: https://docs.docker.com/engine/api/v1.40/#operation/TaskList Nodes: https://docs.docker.com/engine/api/v1.40/#operation/NodeList

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the optional OAuth 2.0 configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as authorization, or basicAuth.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

EC2SDConfig

(Appears on:ScrapeConfigSpec)

EC2SDConfig allow retrieving scrape targets from AWS EC2 instances. The private IP address is used by default, but may be changed to the public IP address with relabeling. The IAM credentials used must have the ec2:DescribeInstances permission to discover scrape targets See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config

The EC2 service discovery requires AWS API keys or role ARN for authentication. BasicAuth, Authorization and OAuth2 fields are not present on purpose.

Field Description
region
string
(Optional)

region defines the AWS region.

accessKey
Kubernetes core/v1.SecretKeySelector
(Optional)

accessKey defines the AWS API key.

secretKey
Kubernetes core/v1.SecretKeySelector
(Optional)

secretKey defines the AWS API secret.

roleARN
string
(Optional)

roleARN defines an alternative to using AWS API keys.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

filters
Filters
(Optional)

filters can be used optionally to filter the instance list by other criteria. Available filter criteria can be found here: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html Filter API documentation: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Filter.html It requires Prometheus >= v2.3.0

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API. It requires Prometheus >= v2.41.0

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects. It requires Prometheus >= v2.41.0

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2. It requires Prometheus >= v2.41.0

EmailConfig

(Appears on:Receiver)

EmailConfig configures notifications via Email.

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

to
string
(Optional)

to defines the email address to send notifications to. This is the recipient address for alert notifications.

from
string
(Optional)

from defines the sender address for email notifications. This appears as the “From” field in the email header.

hello
string
(Optional)

hello defines the hostname to identify to the SMTP server. This is used in the SMTP HELO/EHLO command during the connection handshake.

smarthost
string
(Optional)

smarthost defines the SMTP host and port through which emails are sent. Format should be “hostname:port”, e.g. “smtp.example.com:587”.

authUsername
string
(Optional)

authUsername defines the username to use for SMTP authentication. This is used for SMTP AUTH when the server requires authentication.

authPassword
Kubernetes core/v1.SecretKeySelector
(Optional)

authPassword defines the secret’s key that contains the password to use for authentication. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

authSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

authSecret defines the secret’s key that contains the CRAM-MD5 secret. This is used for CRAM-MD5 authentication mechanism. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

authIdentity
string
(Optional)

authIdentity defines the identity to use for SMTP authentication. This is typically used with PLAIN authentication mechanism.

headers
[]KeyValue
(Optional)

headers defines additional email header key/value pairs. These override any headers previously set by the notification implementation.

html
string
(Optional)

html defines the HTML body of the email notification. This allows for rich formatting in the email content.

text
string
(Optional)

text defines the plain text body of the email notification. This provides a fallback for email clients that don’t support HTML.

requireTLS
bool
(Optional)

requireTLS defines the SMTP TLS requirement. Note that Go does not support unencrypted connections to remote SMTP endpoints.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration for SMTP connections. This includes settings for certificates, CA validation, and TLS protocol options.

EurekaSDConfig

(Appears on:ScrapeConfigSpec)

Eureka SD configurations allow retrieving scrape targets using the Eureka REST API. Prometheus will periodically check the REST endpoint and create a target for every app instance. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#eureka_sd_config

Field Description
server
string

server defines the URL to connect to the Eureka server.

basicAuth
BasicAuth
(Optional)

basicAuth defines the BasicAuth information to use on every scrape request.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

FileSDConfig

(Appears on:ScrapeConfigSpec)

FileSDConfig defines a Prometheus file service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config

Field Description
files
[]SDFile

files defines the list of files to be used for file discovery. Recommendation: use absolute paths. While relative paths work, the prometheus-operator project makes no guarantees about the working directory where the configuration file is stored. Files must be mounted using Prometheus.ConfigMaps or Prometheus.Secrets.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

Filter

Filter name and value pairs to limit the discovery process to a subset of available resources.

Field Description
name
string

name of the Filter.

values
[]string

values defines values to filter on.

Filters ([]github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1.Filter alias)

(Appears on:DockerSDConfig, DockerSwarmSDConfig, EC2SDConfig)

GCESDConfig

(Appears on:ScrapeConfigSpec)

GCESDConfig configures scrape targets from GCP GCE instances. The private IP address is used by default, but may be changed to the public IP address with relabeling. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#gce_sd_config

The GCE service discovery will load the Google Cloud credentials from the file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable. See https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform

A pre-requisite for using GCESDConfig is that a Secret containing valid Google Cloud credentials is mounted into the Prometheus or PrometheusAgent pod via the .spec.secrets field and that the GOOGLE_APPLICATION_CREDENTIALS environment variable is set to /etc/prometheus/secrets//.

Field Description
project
string

project defines the Google Cloud Project ID

zone
string

zone defines the zone of the scrape targets. If you need multiple zones use multiple GCESDConfigs.

filter
string
(Optional)

filter defines the filter that can be used optionally to filter the instance list by other criteria Syntax of this filter is described in the filter query parameter section: https://cloud.google.com/compute/docs/reference/latest/instances/list

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.

tagSeparator
string
(Optional)

tagSeparator defines the tag separator is used to separate the tags on concatenation

HTTPConfig

(Appears on:DiscordConfig, MSTeamsConfig, MSTeamsV2Config, OpsGenieConfig, PagerDutyConfig, PushoverConfig, RocketChatConfig, SNSConfig, SlackConfig, TelegramConfig, VictorOpsConfig, WeChatConfig, WebexConfig, WebhookConfig)

HTTPConfig defines a client HTTP configuration. See https://prometheus.io/docs/alerting/latest/configuration/#http_config

Field Description
authorization
SafeAuthorization
(Optional)

authorization defines the authorization header configuration for the client. This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+.

basicAuth
BasicAuth
(Optional)

basicAuth defines the basic authentication credentials for the client. This is mutually exclusive with Authorization. If both are defined, BasicAuth takes precedence.

oauth2
OAuth2
(Optional)

oauth2 defines the OAuth2 client credentials used to fetch a token for the targets. This enables OAuth2 authentication flow for HTTP requests.

bearerTokenSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

bearerTokenSecret defines the secret’s key that contains the bearer token to be used by the client for authentication. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration for the client. This includes settings for certificates, CA validation, and TLS protocol options.

proxyURL
string
(Optional)

proxyURL defines an optional proxy URL for HTTP requests. If defined, this field takes precedence over proxyUrl.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects specifies whether the client should follow HTTP 3xx redirects. When true, the client will automatically follow redirect responses.

HTTPSDConfig

(Appears on:ScrapeConfigSpec)

HTTPSDConfig defines a prometheus HTTP service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config

Field Description
url
string

url defines the URL from which the targets are fetched.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request. More info: https://prometheus.io/docs/operating/configuration/#endpoints Cannot be set at the same time as authorization, or oAuth2.

authorization
SafeAuthorization
(Optional)

authorization defines the authorization header configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as oAuth2, or basicAuth.

oauth2
OAuth2
(Optional)

oauth2 defines the optional OAuth 2.0 configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as authorization, or basicAuth.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration applying to the target HTTP endpoint.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

HetznerSDConfig

(Appears on:ScrapeConfigSpec)

HetznerSDConfig allow retrieving scrape targets from Hetzner Cloud API and Robot API. This service discovery uses the public IPv4 address by default, but that can be changed with relabeling See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#hetzner_sd_config

Field Description
role
string

role defines the Hetzner role of entities that should be discovered.

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

labelSelector
string
(Optional)

labelSelector defines the label selector used to filter the servers when fetching them from the API. It requires Prometheus >= v3.5.0.

InhibitRule

(Appears on:AlertmanagerConfigSpec)

InhibitRule defines an inhibition rule that allows to mute alerts when other alerts are already firing. See https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule

Field Description
targetMatch
[]Matcher
(Optional)

targetMatch defines matchers that have to be fulfilled in the alerts to be muted. The operator enforces that the alert matches the resource’s namespace. When these conditions are met, matching alerts will be inhibited (silenced).

sourceMatch
[]Matcher
(Optional)

sourceMatch defines matchers for which one or more alerts have to exist for the inhibition to take effect. The operator enforces that the alert matches the resource’s namespace. These are the “trigger” alerts that cause other alerts to be inhibited.

equal
[]string
(Optional)

equal defines labels that must have an equal value in the source and target alert for the inhibition to take effect. This ensures related alerts are properly grouped.

IonosSDConfig

(Appears on:ScrapeConfigSpec)

IonosSDConfig configurations allow retrieving scrape targets from IONOS resources. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ionos_sd_config

Field Description
datacenterID
string

datacenterID defines the unique ID of the IONOS data center.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

authorization
SafeAuthorization

authorization defines the header configuration to authenticate against the IONOS. Cannot be set at the same time as oauth2.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

K8SSelectorConfig

(Appears on:KubernetesSDConfig)

K8SSelectorConfig is Kubernetes Selector Config

Field Description
role
KubernetesRole

role defines the type of Kubernetes resource to limit the service discovery to. Accepted values are: Node, Pod, Endpoints, EndpointSlice, Service, Ingress.

label
string
(Optional)

label defines an optional label selector to limit the service discovery to resources with specific labels and label values. e.g: node.kubernetes.io/instance-type=master

field
string
(Optional)

field defines an optional field selector to limit the service discovery to resources which have fields with specific values. e.g: metadata.name=foobar

KeyValue

(Appears on:EmailConfig, OpsGenieConfig, PagerDutyConfig, VictorOpsConfig)

KeyValue defines a (key, value) tuple.

Field Description
key
string

key defines the key of the tuple. This is the identifier or name part of the key-value pair.

value
string

value defines the value of the tuple. This is the data or content associated with the key.

KubernetesRole (string alias)

(Appears on:K8SSelectorConfig, KubernetesSDConfig)

Value Description

"Endpoints"

"EndpointSlice"

"Ingress"

"Node"

"Pod"

"Service"

KubernetesSDConfig

(Appears on:ScrapeConfigSpec)

KubernetesSDConfig allows retrieving scrape targets from Kubernetes’ REST API. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config

Field Description
apiServer
string
(Optional)

apiServer defines the API server address consisting of a hostname or IP address followed by an optional port number. If left empty, Prometheus is assumed to run inside of the cluster. It will discover API servers automatically and use the pod’s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.

role
KubernetesRole

role defines the Kubernetes role of the entities that should be discovered. Role Endpointslice requires Prometheus >= v2.21.0

namespaces
NamespaceDiscovery
(Optional)

namespaces defines the namespace discovery. If omitted, Prometheus discovers targets across all namespaces.

attachMetadata
AttachMetadata
(Optional)

attachMetadata defines the metadata to attach to discovered targets. It requires Prometheus >= v2.35.0 when using the Pod role and Prometheus >= v2.37.0 for Endpoints and Endpointslice roles.

selectors
[]K8SSelectorConfig
(Optional)

selectors defines the selector to select objects. It requires Prometheus >= v2.17.0

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request. Cannot be set at the same time as authorization, or oauth2.

authorization
SafeAuthorization
(Optional)

authorization defines the authorization header to use on every scrape request. Cannot be set at the same time as basicAuth, or oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the optional OAuth 2.0 configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as authorization, or basicAuth.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Kubernetes API.

KumaSDConfig

(Appears on:ScrapeConfigSpec)

KumaSDConfig allow retrieving scrape targets from Kuma’s control plane. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kuma_sd_config

Field Description
server
string

server defines the address of the Kuma Control Plane’s MADS xDS server.

clientID
string
(Optional)

clientID is used by Kuma Control Plane to compute Monitoring Assignment for specific Prometheus backend.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

fetchTimeout
Duration
(Optional)

fetchTimeout defines the time after which the monitoring assignments are refreshed.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

LightSailSDConfig

(Appears on:ScrapeConfigSpec)

LightSailSDConfig configurations allow retrieving scrape targets from AWS Lightsail instances. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#lightsail_sd_config TODO: Need to document that we will not be supporting the _file fields.

Field Description
region
string
(Optional)

region defines the AWS region.

accessKey
Kubernetes core/v1.SecretKeySelector
(Optional)

accessKey defines the AWS API key.

secretKey
Kubernetes core/v1.SecretKeySelector
(Optional)

secretKey defines the AWS API secret.

roleARN
string
(Optional)

roleARN defines the AWS Role ARN, an alternative to using AWS API keys.

endpoint
string
(Optional)

endpoint defines the custom endpoint to be used.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request. Cannot be set at the same time as authorization, or oauth2.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the optional OAuth 2.0 configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as authorization, or basicAuth.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

LinodeSDConfig

(Appears on:ScrapeConfigSpec)

LinodeSDConfig configurations allow retrieving scrape targets from Linode’s Linode APIv4. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#linode_sd_config

Field Description
region
string
(Optional)

region defines the region to filter on.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must

tagSeparator
string
(Optional)

tagSeparator defines the string by which Linode Instance tags are joined into the tag label.el.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the optional OAuth 2.0 configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as authorization, or basicAuth.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

MSTeamsConfig

(Appears on:Receiver)

MSTeamsConfig configures notifications via Microsoft Teams. It requires Alertmanager >= 0.26.0.

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

webhookUrl
Kubernetes core/v1.SecretKeySelector

webhookUrl defines the MSTeams webhook URL for sending notifications. This is the incoming webhook URL configured in your Teams channel.

title
string
(Optional)

title defines the message title template for Teams notifications. This appears as the main heading of the Teams message card.

summary
string
(Optional)

summary defines the message summary template for Teams notifications. This provides a brief overview that appears in Teams notification previews. It requires Alertmanager >= 0.27.0.

text
string
(Optional)

text defines the message body template for Teams notifications. This contains the detailed content of the Teams message.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for Teams webhook requests.

MSTeamsV2Config

(Appears on:Receiver)

MSTeamsV2Config configures notifications via Microsoft Teams using the new message format with adaptive cards as required by flows. See https://prometheus.io/docs/alerting/latest/configuration/#msteamsv2_config It requires Alertmanager >= 0.28.0.

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

webhookURL
Kubernetes core/v1.SecretKeySelector
(Optional)

webhookURL defines the MSTeams incoming webhook URL for adaptive card notifications. This webhook must support the newer adaptive cards format required by Teams flows.

title
string
(Optional)

title defines the message title template for adaptive card notifications. This appears as the main heading in the Teams adaptive card.

text
string
(Optional)

text defines the message body template for adaptive card notifications. This contains the detailed content displayed in the Teams adaptive card format.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for Teams webhook requests.

MatchType (string alias)

(Appears on:Matcher)

MatchType is a comparison operator on a Matcher

Value Description

"="

"!="

"!~"

"=~"

Matcher

(Appears on:InhibitRule, Route)

Matcher defines how to match on alert’s labels.

Field Description
name
string

name defines the label to match. This specifies which alert label should be evaluated.

value
string
(Optional)

value defines the label value to match. This is the expected value for the specified label.

matchType
MatchType
(Optional)

matchType defines the match operation available with AlertManager >= v0.22.0. Takes precedence over Regex (deprecated) if non-empty. Valid values: “=” (equality), “!=” (inequality), “=~” (regex match), “!~” (regex non-match).

regex
bool
(Optional)

regex defines whether to match on equality (false) or regular-expression (true). Deprecated: for AlertManager >= v0.22.0, matchType should be used instead.

Month (string alias)

Month of the year

Value Description

"april"

"august"

"december"

"february"

"january"

"july"

"june"

"march"

"may"

"november"

"october"

"september"

MonthRange (string alias)

(Appears on:TimeInterval)

MonthRange is an inclusive range of months of the year beginning in January Months can be specified by name (e.g ‘January’) by numerical month (e.g ‘1’) or as an inclusive range (e.g ‘January:March’, ‘1:3’, ‘1:March’)

MuteTimeInterval

(Appears on:AlertmanagerConfigSpec)

MuteTimeInterval specifies the periods in time when notifications will be muted

Field Description
name
string

name of the time interval

timeIntervals
[]TimeInterval
(Optional)

timeIntervals defines a list of TimeInterval

NamespaceDiscovery

(Appears on:KubernetesSDConfig)

NamespaceDiscovery is the configuration for discovering Kubernetes namespaces.

Field Description
ownNamespace
bool
(Optional)

ownNamespace includes the namespace in which the Prometheus pod runs to the list of watched namespaces.

names
[]string
(Optional)

names defines a list of namespaces where to watch for resources. If empty and ownNamespace isn’t true, Prometheus watches for resources in all namespaces.

NomadSDConfig

(Appears on:ScrapeConfigSpec)

NomadSDConfig configurations allow retrieving scrape targets from Nomad’s Service API. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#nomad_sd_config

Field Description
allowStale
bool
(Optional)

allowStale defines the information to access the Nomad API. It is to be defined as the Nomad documentation requires.

namespace
string
(Optional)

namespace defines the Nomad namespace to query for service discovery. When specified, only resources within this namespace will be discovered.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

region
string
(Optional)

region defines the Nomad region to query for service discovery. When specified, only resources within this region will be discovered.

server
string

server defines the Nomad server address to connect to for service discovery. This should be the full URL including protocol (e.g., “https://nomad.example.com:4646”).

tagSeparator
string
(Optional)

tagSeparator defines the separator used to join multiple tags. This determines how Nomad service tags are concatenated into Prometheus labels.

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

OVHCloudSDConfig

(Appears on:ScrapeConfigSpec)

OVHCloudSDConfig configurations allow retrieving scrape targets from OVHcloud’s dedicated servers and VPS using their API. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ovhcloud_sd_config

Field Description
applicationKey
string

applicationKey defines the access key to use for OVHCloud API authentication. This is obtained from the OVHCloud API credentials at https://api.ovh.com.

applicationSecret
Kubernetes core/v1.SecretKeySelector

applicationSecret defines the secret key for OVHCloud API authentication. This contains the application secret obtained during OVHCloud API credential creation.

consumerKey
Kubernetes core/v1.SecretKeySelector

consumerKey defines the consumer key for OVHCloud API authentication. This is the third component of OVHCloud’s three-key authentication system.

service
OVHService

service defines the service type of the targets to retrieve. Must be either VPS or DedicatedServer to specify which OVHCloud resources to discover.

endpoint
string
(Optional)

endpoint defines a custom API endpoint to be used. When not specified, defaults to the standard OVHCloud API endpoint for the region.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

OVHService (string alias)

(Appears on:OVHCloudSDConfig)

Service of the targets to retrieve. Must be VPS or DedicatedServer.

Value Description

"DedicatedServer"

"VPS"

OpenStackRole (string alias)

(Appears on:OpenStackSDConfig)

Value Description

"Hypervisor"

"Instance"

"LoadBalancer"

OpenStackSDConfig

(Appears on:ScrapeConfigSpec)

OpenStackSDConfig allow retrieving scrape targets from OpenStack Nova instances. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#openstack_sd_config

Field Description
role
OpenStackRole

role defines the OpenStack role of entities that should be discovered.

Note: The LoadBalancer role requires Prometheus >= v3.2.0.

region
string

region defines the OpenStack Region.

identityEndpoint
string
(Optional)

identityEndpoint defines the HTTP endpoint that is required to work with the Identity API of the appropriate version.

username
string
(Optional)

username defines the username required if using Identity V2 API. Consult with your provider’s control panel to discover your account’s username. In Identity V3, either userid or a combination of username and domainId or domainName are needed

userid
string
(Optional)

userid defines the OpenStack userid.

password
Kubernetes core/v1.SecretKeySelector
(Optional)

password defines the password for the Identity V2 and V3 APIs. Consult with your provider’s control panel to discover your account’s preferred method of authentication.

domainName
string
(Optional)

domainName defines at most one of domainId and domainName that must be provided if using username with Identity V3. Otherwise, either are optional.

domainID
string
(Optional)

domainID defines The OpenStack domainID.

projectName
string
(Optional)

projectName defines an optional field for the Identity V2 API. Some providers allow you to specify a ProjectName instead of the ProjectId. Some require both. Your provider’s authentication policies will determine how these fields influence authentication.

projectID
string
(Optional)

projectID defines the OpenStack projectID.

applicationCredentialName
string
(Optional)

applicationCredentialName defines the ApplicationCredentialID or ApplicationCredentialName fields are required if using an application credential to authenticate. Some providers allow you to create an application credential to authenticate rather than a password.

applicationCredentialId
string
(Optional)

applicationCredentialId defines the OpenStack applicationCredentialId.

applicationCredentialSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

applicationCredentialSecret defines the required field if using an application credential to authenticate.

allTenants
bool
(Optional)

allTenants defines whether the service discovery should list all instances for all projects. It is only relevant for the ‘instance’ role and usually requires admin permissions.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must instead be specified in the relabeling rule.

availability
string
(Optional)

availability defines the availability of the endpoint to connect to.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration applying to the target HTTP endpoint.

OpsGenieConfig

(Appears on:Receiver)

OpsGenieConfig configures notifications via OpsGenie. See https://prometheus.io/docs/alerting/latest/configuration/#opsgenie_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiKey
Kubernetes core/v1.SecretKeySelector
(Optional)

apiKey defines the secret’s key that contains the OpsGenie API key. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

apiURL
string
(Optional)

apiURL defines the URL to send OpsGenie API requests to. When not specified, defaults to the standard OpsGenie API endpoint.

message
string
(Optional)

message defines the alert text limited to 130 characters. This appears as the main alert title in OpsGenie.

description
string
(Optional)

description defines the detailed description of the incident. This provides additional context beyond the message field.

source
string
(Optional)

source defines the backlink to the sender of the notification. This helps identify where the alert originated from.

tags
string
(Optional)

tags defines a comma separated list of tags attached to the notifications. These help categorize and filter alerts within OpsGenie.

note
string
(Optional)

note defines an additional alert note. This provides supplementary information about the alert.

priority
string
(Optional)

priority defines the priority level of alert. Possible values are P1, P2, P3, P4, and P5, where P1 is highest priority.

updateAlerts
bool
(Optional)

updateAlerts defines Whether to update message and description of the alert in OpsGenie if it already exists By default, the alert is never updated in OpsGenie, the new message only appears in activity log.

details
[]KeyValue
(Optional)

details defines a set of arbitrary key/value pairs that provide further detail about the incident. These appear as additional fields in the OpsGenie alert.

responders
[]OpsGenieConfigResponder
(Optional)

responders defines the list of responders responsible for notifications. These determine who gets notified when the alert is created.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for OpsGenie API requests.

entity
string
(Optional)

entity defines an optional field that can be used to specify which domain alert is related to. This helps group related alerts together in OpsGenie.

actions
string
(Optional)

actions defines a comma separated list of actions that will be available for the alert. These appear as action buttons in the OpsGenie interface.

OpsGenieConfigResponder

(Appears on:OpsGenieConfig)

OpsGenieConfigResponder defines a responder to an incident. One of id, name or username has to be defined.

Field Description
id
string
(Optional)

id defines the unique identifier of the responder. This corresponds to the responder’s ID within OpsGenie.

name
string
(Optional)

name defines the display name of the responder. This is used when the responder is identified by name rather than ID.

username
string
(Optional)

username defines the username of the responder. This is typically used for user-type responders when identifying by username.

type
string

type defines the type of responder. Valid values include “user”, “team”, “schedule”, and “escalation”. This determines how OpsGenie interprets the other identifier fields.

PagerDutyConfig

(Appears on:Receiver)

PagerDutyConfig configures notifications via PagerDuty. See https://prometheus.io/docs/alerting/latest/configuration/#pagerduty_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

routingKey
Kubernetes core/v1.SecretKeySelector
(Optional)

routingKey defines the secret’s key that contains the PagerDuty integration key (when using Events API v2). Either this field or serviceKey needs to be defined. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

serviceKey
Kubernetes core/v1.SecretKeySelector
(Optional)

serviceKey defines the secret’s key that contains the PagerDuty service key (when using integration type “Prometheus”). Either this field or routingKey needs to be defined. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

url
string
(Optional)

url defines the URL to send requests to.

client
string
(Optional)

client defines the client identification.

clientURL
string
(Optional)

clientURL defines the backlink to the sender of notification.

description
string
(Optional)

description of the incident.

severity
string
(Optional)

severity of the incident.

class
string
(Optional)

class defines the class/type of the event.

group
string
(Optional)

group defines a cluster or grouping of sources.

component
string
(Optional)

component defines the part or component of the affected system that is broken.

details
[]KeyValue
(Optional)

details defines the arbitrary key/value pairs that provide further detail about the incident.

pagerDutyImageConfigs
[]PagerDutyImageConfig
(Optional)

pagerDutyImageConfigs defines a list of image details to attach that provide further detail about an incident.

pagerDutyLinkConfigs
[]PagerDutyLinkConfig
(Optional)

pagerDutyLinkConfigs defines a list of link details to attach that provide further detail about an incident.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration.

source
string
(Optional)

source defines the unique location of the affected system.

PagerDutyImageConfig

(Appears on:PagerDutyConfig)

PagerDutyImageConfig attaches images to an incident

Field Description
src
string
(Optional)

src of the image being attached to the incident

href
string
(Optional)

href defines the optional URL; makes the image a clickable link.

alt
string
(Optional)

alt is the optional alternative text for the image.

PagerDutyLinkConfig

(Appears on:PagerDutyConfig)

PagerDutyLinkConfig attaches text links to an incident

Field Description
href
string
(Optional)

href defines the URL of the link to be attached

alt
string
(Optional)

alt defines the text that describes the purpose of the link, and can be used as the link’s text.

ParsedRange

ParsedRange is an integer representation of a range

Field Description
start
int
(Optional)

start defines the beginning of the range

end
int
(Optional)

end defines the end of the range

PrometheusAgentMode (string alias)

(Appears on:PrometheusAgentSpec)

Value Description

"DaemonSet"

Deploys PrometheusAgent as DaemonSet.

"StatefulSet"

Deploys PrometheusAgent as StatefulSet.

PrometheusAgentSpec

(Appears on:PrometheusAgent)

PrometheusAgentSpec is a specification of the desired behavior of the Prometheus agent. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Field Description
mode
PrometheusAgentMode
(Optional)

mode defines how the Prometheus operator deploys the PrometheusAgent pod(s).

(Alpha) Using this field requires the PrometheusAgentDaemonSet feature gate to be enabled.

podMetadata
EmbeddedObjectMetadata
(Optional)

podMetadata defines labels and annotations which are propagated to the Prometheus pods.

The following items are reserved and cannot be overridden: * “prometheus” label, set to the name of the Prometheus object. * “app.kubernetes.io/instance” label, set to the name of the Prometheus object. * “app.kubernetes.io/managed-by” label, set to “prometheus-operator”. * “app.kubernetes.io/name” label, set to “prometheus”. * “app.kubernetes.io/version” label, set to the Prometheus version. * “operator.prometheus.io/name” label, set to the name of the Prometheus object. * “operator.prometheus.io/shard” label, set to the shard number of the Prometheus object. * “kubectl.kubernetes.io/default-container” annotation, set to “prometheus”.

serviceMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorSelector defines the serviceMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

serviceMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

serviceMonitorNamespaceSelector defines the namespaces to match for ServicedMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

podMonitorSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorSelector defines the podMonitors to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

podMonitorNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

podMonitorNamespaceSelector defines the namespaces to match for PodMonitors discovery. An empty label selector matches all namespaces. A null label selector (default value) matches the current namespace only.

probeSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeSelector defines the probes to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

probeNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

probeNamespaceSelector defines the namespaces to match for Probe discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

scrapeConfigSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigSelector defines the scrapeConfigs to be selected for target discovery. An empty label selector matches all objects. A null label selector matches no objects.

If spec.serviceMonitorSelector, spec.podMonitorSelector, spec.probeSelector and spec.scrapeConfigSelector are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration’s Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the prometheus.yaml.gz key. This behavior is deprecated and will be removed in the next major version of the custom resource definition. It is recommended to use spec.additionalScrapeConfigs instead.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

scrapeConfigNamespaceSelector
Kubernetes meta/v1.LabelSelector
(Optional)

scrapeConfigNamespaceSelector defines the namespaces to match for ScrapeConfig discovery. An empty label selector matches all namespaces. A null label selector matches the current namespace only.

Note that the ScrapeConfig custom resource definition is currently at Alpha level.

version
string
(Optional)

version of Prometheus being deployed. The operator uses this information to generate the Prometheus StatefulSet + configuration files.

If not specified, the operator assumes the latest upstream version of Prometheus available at the time when the version of the operator was released.

paused
bool
(Optional)

paused defines when a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.

image
string
(Optional)

image defines the container image name for Prometheus. If specified, it takes precedence over the spec.baseImage, spec.tag and spec.sha fields.

Specifying spec.version is still necessary to ensure the Prometheus Operator knows which version of Prometheus is being configured.

If neither spec.image nor spec.baseImage are defined, the operator will use the latest upstream version of Prometheus available at the time when the operator was released.

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

imagePullPolicy defines the image pull policy for the ‘prometheus’, ‘init-config-reloader’ and ‘config-reloader’ containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

imagePullSecrets defines an optional list of references to Secrets in the same namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

replicas
int32
(Optional)

replicas defines the number of replicas of each shard to deploy for a Prometheus deployment. spec.replicas multiplied by spec.shards is the total number of Pods created.

Default: 1

shards
int32
(Optional)

shards defines the number of shards to distribute the scraped targets onto.

spec.replicas multiplied by spec.shards is the total number of Pods being created.

When not defined, the operator assumes only one shard.

Note that scaling down shards will not reshard data onto the remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available from the same instances. To query globally, use either * Thanos sidecar + querier for query federation and Thanos Ruler for rules. * Remote-write to send metrics to a central location.

By default, the sharding of targets is performed on: * The __address__ target’s metadata label for PodMonitor, ServiceMonitor and ScrapeConfig resources. * The __param_target__ label for Probe resources.

Users can define their own sharding implementation by setting the __tmp_hash label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class).

You can also disable sharding on a specific target by setting the __tmp_disable_sharding label with relabeling configuration. When the label value isn’t empty, all Prometheus shards will scrape the target.

replicaExternalLabelName
string
(Optional)

replicaExternalLabelName defines the name of Prometheus external label used to denote the replica name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus_replica”

prometheusExternalLabelName
string
(Optional)

prometheusExternalLabelName defines the name of Prometheus external label used to denote the Prometheus instance name. The external label will not be added when the field is set to the empty string ("").

Default: “prometheus”

logLevel
string
(Optional)

logLevel for Prometheus and the config-reloader sidecar.

logFormat
string
(Optional)

logFormat for Log level for Prometheus and the config-reloader sidecar.

scrapeInterval
Duration
(Optional)

scrapeInterval defines interval between consecutive scrapes.

Default: “30s”

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

PrometheusText1.0.0 requires Prometheus >= v3.0.0.

externalLabels
map[string]string
(Optional)

externalLabels defines the labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). Labels defined by spec.replicaExternalLabelName and spec.prometheusExternalLabelName take precedence over this list.

enableRemoteWriteReceiver
bool
(Optional)

enableRemoteWriteReceiver defines the Prometheus to be used as a receiver for the Prometheus remote write protocol.

WARNING: This is not considered an efficient way of ingesting samples. Use it with caution for specific low-volume use cases. It is not suitable for replacing the ingestion via scraping and turning Prometheus into a push-based metrics collection system. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver

It requires Prometheus >= v2.33.0.

enableOTLPReceiver
bool
(Optional)

enableOTLPReceiver defines the Prometheus to be used as a receiver for the OTLP Metrics protocol.

Note that the OTLP receiver endpoint is automatically enabled if .spec.otlpConfig is defined.

It requires Prometheus >= v2.47.0.

remoteWriteReceiverMessageVersions
[]RemoteWriteMessageVersion
(Optional)

remoteWriteReceiverMessageVersions list of the protobuf message versions to accept when receiving the remote writes.

It requires Prometheus >= v2.54.0.

enableFeatures
[]EnableFeature
(Optional)

enableFeatures enables access to Prometheus feature flags. By default, no features are enabled.

Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/

externalUrl
string
(Optional)

externalUrl defines the external URL under which the Prometheus service is externally available. This is necessary to generate correct URLs (for instance if Prometheus is accessible behind an Ingress resource).

routePrefix
string
(Optional)

routePrefix defines the route prefix Prometheus registers HTTP handlers for.

This is useful when using spec.externalURL, and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with kubectl proxy.

storage
StorageSpec
(Optional)

storage defines the storage used by Prometheus.

volumes
[]Kubernetes core/v1.Volume
(Optional)

volumes allows the configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

volumeMounts
[]Kubernetes core/v1.VolumeMount
(Optional)

volumeMounts allows the configuration of additional VolumeMounts.

VolumeMounts will be appended to other VolumeMounts in the ‘prometheus’ container, that are generated as a result of StorageSpec objects.

persistentVolumeClaimRetentionPolicy
Kubernetes apps/v1.StatefulSetPersistentVolumeClaimRetentionPolicy
(Optional)

persistentVolumeClaimRetentionPolicy defines the field controls if and how PVCs are deleted during the lifecycle of a StatefulSet. The default behavior is all PVCs are retained. This is an alpha field from kubernetes 1.23 until 1.26 and a beta field from 1.26. It requires enabling the StatefulSetAutoDeletePVC feature gate.

web
PrometheusWebSpec
(Optional)

web defines the configuration of the Prometheus web server.

resources
Kubernetes core/v1.ResourceRequirements
(Optional)

resources defines the resources requests and limits of the ‘prometheus’ container.

nodeSelector
map[string]string
(Optional)

nodeSelector defines on which Nodes the Pods are scheduled.

serviceAccountName
string
(Optional)

serviceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.

automountServiceAccountToken
bool
(Optional)

automountServiceAccountToken defines whether a service account token should be automatically mounted in the pod. If the field isn’t 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.

secrets
[]string
(Optional)

secrets defines a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each Secret is added to the StatefulSet definition as a volume named secret-<secret-name>. The Secrets are mounted into /etc/prometheus/secrets/ in the ‘prometheus’ container.

configMaps
[]string
(Optional)

configMaps defines a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. Each ConfigMap is added to the StatefulSet definition as a volume named configmap-<configmap-name>. The ConfigMaps are mounted into /etc/prometheus/configmaps/ in the ‘prometheus’ container.

affinity
Kubernetes core/v1.Affinity
(Optional)

affinity defines the Pods’ affinity scheduling rules if specified.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

tolerations defines the Pods’ tolerations if specified.

topologySpreadConstraints
[]TopologySpreadConstraint
(Optional)

topologySpreadConstraints defines the pod’s topology spread constraints if specified.

remoteWrite
[]RemoteWriteSpec
(Optional)

remoteWrite defines the list of remote write configurations.

otlp
OTLPConfig
(Optional)

otlp defines the settings related to the OTLP receiver feature. It requires Prometheus >= v2.55.0.

securityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

securityContext holds pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

dnsPolicy
DNSPolicy
(Optional)

dnsPolicy defines the DNS policy for the pods.

dnsConfig
PodDNSConfig
(Optional)

dnsConfig defines the DNS configuration for the pods.

listenLocal
bool
(Optional)

listenLocal when true, the Prometheus server listens on the loopback address instead of the Pod IP’s address.

enableServiceLinks
bool
(Optional)

enableServiceLinks defines whether information about services should be injected into pod’s environment variables

containers
[]Kubernetes core/v1.Container
(Optional)

containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch.

The names of containers managed by the operator are: * prometheus * config-reloader * thanos-sidecar

Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

initContainers
[]Kubernetes core/v1.Container
(Optional)

initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done via a strategic merge patch.

The names of init container name managed by the operator are: * init-config-reloader.

Overriding init containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.

additionalScrapeConfigs
Kubernetes core/v1.SecretKeySelector
(Optional)

additionalScrapeConfigs allows specifying a key of a Secret containing additional Prometheus scrape configurations. Scrape configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible scrape configs are going to break Prometheus after the upgrade.

apiserverConfig
APIServerConfig
(Optional)

apiserverConfig allows specifying a host and auth methods to access the Kuberntees API server. If null, Prometheus is assumed to run inside of the cluster: it will discover the API servers automatically and use the Pod’s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.

priorityClassName
string
(Optional)

priorityClassName assigned to the Pods.

portName
string
(Optional)

portName used for the pods and governing service. Default: “web”

arbitraryFSAccessThroughSMs
ArbitraryFSAccessThroughSMsConfig
(Optional)

arbitraryFSAccessThroughSMs when true, ServiceMonitor, PodMonitor and Probe object are forbidden to reference arbitrary files on the file system of the ‘prometheus’ container. When a ServiceMonitor’s endpoint specifies a bearerTokenFile value (e.g. ‘/var/run/secrets/kubernetes.io/serviceaccount/token’), a malicious target can get access to the Prometheus service account’s token in the Prometheus’ scrape request. Setting spec.arbitraryFSAccessThroughSM to ‘true’ would prevent the attack. Users should instead provide the credentials using the spec.bearerTokenSecret field.

overrideHonorLabels
bool
(Optional)

overrideHonorLabels when true, Prometheus resolves label conflicts by renaming the labels in the scraped data to “exported_” for all targets created from ServiceMonitor, PodMonitor and ScrapeConfig objects. Otherwise the HonorLabels field of the service or pod monitor applies. In practice,OverrideHonorLabels:true enforces honorLabels:false for all ServiceMonitor, PodMonitor and ScrapeConfig objects.

overrideHonorTimestamps
bool
(Optional)

overrideHonorTimestamps when true, Prometheus ignores the timestamps for all the targets created from service and pod monitors. Otherwise the HonorTimestamps field of the service or pod monitor applies.

ignoreNamespaceSelectors
bool
(Optional)

ignoreNamespaceSelectors when true, spec.namespaceSelector from all PodMonitor, ServiceMonitor and Probe objects will be ignored. They will only discover targets within the namespace of the PodMonitor, ServiceMonitor and Probe object.

enforcedNamespaceLabel
string
(Optional)

enforcedNamespaceLabel when not empty, a label will be added to:

  1. All metrics scraped from ServiceMonitor, PodMonitor, Probe and ScrapeConfig objects.
  2. All metrics generated from recording rules defined in PrometheusRule objects.
  3. All alerts generated from alerting rules defined in PrometheusRule objects.
  4. All vector selectors of PromQL expressions defined in PrometheusRule objects.

The label will not added for objects referenced in spec.excludedFromEnforcement.

The label’s name is this field’s value. The label’s value is the namespace of the ServiceMonitor, PodMonitor, Probe, PrometheusRule or ScrapeConfig object.

enforcedSampleLimit
uint64
(Optional)

enforcedSampleLimit when defined specifies a global limit on the number of scraped samples that will be accepted. This overrides any spec.sampleLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.sampleLimit is greater than zero and less than spec.enforcedSampleLimit.

It is meant to be used by admins to keep the overall number of samples/series under a desired limit.

When both enforcedSampleLimit and sampleLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined sampleLimit value will inherit the global sampleLimit value (Prometheus >= 2.45.0) or the enforcedSampleLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedSampleLimit is greater than the sampleLimit, the sampleLimit will be set to enforcedSampleLimit. * Scrape objects with a sampleLimit value less than or equal to enforcedSampleLimit keep their specific value. * Scrape objects with a sampleLimit value greater than enforcedSampleLimit are set to enforcedSampleLimit.

enforcedTargetLimit
uint64
(Optional)

enforcedTargetLimit when defined specifies a global limit on the number of scraped targets. The value overrides any spec.targetLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.targetLimit is greater than zero and less than spec.enforcedTargetLimit.

It is meant to be used by admins to to keep the overall number of targets under a desired limit.

When both enforcedTargetLimit and targetLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined targetLimit value will inherit the global targetLimit value (Prometheus >= 2.45.0) or the enforcedTargetLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedTargetLimit is greater than the targetLimit, the targetLimit will be set to enforcedTargetLimit. * Scrape objects with a targetLimit value less than or equal to enforcedTargetLimit keep their specific value. * Scrape objects with a targetLimit value greater than enforcedTargetLimit are set to enforcedTargetLimit.

enforcedLabelLimit
uint64
(Optional)

enforcedLabelLimit when defined specifies a global limit on the number of labels per sample. The value overrides any spec.labelLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelLimit is greater than zero and less than spec.enforcedLabelLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelLimit and labelLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelLimit value will inherit the global labelLimit value (Prometheus >= 2.45.0) or the enforcedLabelLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelLimit is greater than the labelLimit, the labelLimit will be set to enforcedLabelLimit. * Scrape objects with a labelLimit value less than or equal to enforcedLabelLimit keep their specific value. * Scrape objects with a labelLimit value greater than enforcedLabelLimit are set to enforcedLabelLimit.

enforcedLabelNameLengthLimit
uint64
(Optional)

enforcedLabelNameLengthLimit when defined specifies a global limit on the length of labels name per sample. The value overrides any spec.labelNameLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelNameLengthLimit is greater than zero and less than spec.enforcedLabelNameLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelNameLengthLimit and labelNameLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelNameLengthLimit value will inherit the global labelNameLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelNameLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelNameLengthLimit is greater than the labelNameLengthLimit, the labelNameLengthLimit will be set to enforcedLabelNameLengthLimit. * Scrape objects with a labelNameLengthLimit value less than or equal to enforcedLabelNameLengthLimit keep their specific value. * Scrape objects with a labelNameLengthLimit value greater than enforcedLabelNameLengthLimit are set to enforcedLabelNameLengthLimit.

enforcedLabelValueLengthLimit
uint64
(Optional)

enforcedLabelValueLengthLimit when not null defines a global limit on the length of labels value per sample. The value overrides any spec.labelValueLengthLimit set by ServiceMonitor, PodMonitor, Probe objects unless spec.labelValueLengthLimit is greater than zero and less than spec.enforcedLabelValueLengthLimit.

It requires Prometheus >= v2.27.0.

When both enforcedLabelValueLengthLimit and labelValueLengthLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined labelValueLengthLimit value will inherit the global labelValueLengthLimit value (Prometheus >= 2.45.0) or the enforcedLabelValueLengthLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedLabelValueLengthLimit is greater than the labelValueLengthLimit, the labelValueLengthLimit will be set to enforcedLabelValueLengthLimit. * Scrape objects with a labelValueLengthLimit value less than or equal to enforcedLabelValueLengthLimit keep their specific value. * Scrape objects with a labelValueLengthLimit value greater than enforcedLabelValueLengthLimit are set to enforcedLabelValueLengthLimit.

enforcedKeepDroppedTargets
uint64
(Optional)

enforcedKeepDroppedTargets when defined specifies a global limit on the number of targets dropped by relabeling that will be kept in memory. The value overrides any spec.keepDroppedTargets set by ServiceMonitor, PodMonitor, Probe objects unless spec.keepDroppedTargets is greater than zero and less than spec.enforcedKeepDroppedTargets.

It requires Prometheus >= v2.47.0.

When both enforcedKeepDroppedTargets and keepDroppedTargets are defined and greater than zero, the following rules apply: * Scrape objects without a defined keepDroppedTargets value will inherit the global keepDroppedTargets value (Prometheus >= 2.45.0) or the enforcedKeepDroppedTargets value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedKeepDroppedTargets is greater than the keepDroppedTargets, the keepDroppedTargets will be set to enforcedKeepDroppedTargets. * Scrape objects with a keepDroppedTargets value less than or equal to enforcedKeepDroppedTargets keep their specific value. * Scrape objects with a keepDroppedTargets value greater than enforcedKeepDroppedTargets are set to enforcedKeepDroppedTargets.

enforcedBodySizeLimit
ByteSize
(Optional)

enforcedBodySizeLimit when defined specifies a global limit on the size of uncompressed response body that will be accepted by Prometheus. Targets responding with a body larger than this many bytes will cause the scrape to fail.

It requires Prometheus >= v2.28.0.

When both enforcedBodySizeLimit and bodySizeLimit are defined and greater than zero, the following rules apply: * Scrape objects without a defined bodySizeLimit value will inherit the global bodySizeLimit value (Prometheus >= 2.45.0) or the enforcedBodySizeLimit value (Prometheus < v2.45.0). If Prometheus version is >= 2.45.0 and the enforcedBodySizeLimit is greater than the bodySizeLimit, the bodySizeLimit will be set to enforcedBodySizeLimit. * Scrape objects with a bodySizeLimit value less than or equal to enforcedBodySizeLimit keep their specific value. * Scrape objects with a bodySizeLimit value greater than enforcedBodySizeLimit are set to enforcedBodySizeLimit.

nameValidationScheme
NameValidationSchemeOptions
(Optional)

nameValidationScheme defines the validation scheme for metric and label names.

It requires Prometheus >= v2.55.0.

nameEscapingScheme
NameEscapingSchemeOptions
(Optional)

nameEscapingScheme defines the character escaping scheme that will be requested when scraping for metric and label names that do not conform to the legacy Prometheus character set.

It requires Prometheus >= v3.4.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets.

It requires Prometheus >= v3.4.0.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

It requires Prometheus >= v3.5.0.

minReadySeconds
int32
(Optional)

minReadySeconds defines the minimum number of seconds for which a newly created Pod should be ready without any of its container crashing for it to be considered available.

If unset, pods will be considered available as soon as they are ready.

hostAliases
[]HostAlias
(Optional)

hostAliases defines the optional list of hosts and IPs that will be injected into the Pod’s hosts file if specified.

additionalArgs
[]Argument
(Optional)

additionalArgs allows setting additional arguments for the ‘prometheus’ container.

It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the Prometheus container which may cause issues if they are invalid or not supported by the given Prometheus version.

In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged.

walCompression
bool
(Optional)

walCompression defines the compression of the write-ahead log (WAL) using Snappy.

WAL compression is enabled by default for Prometheus >= 2.20.0

Requires Prometheus v2.11.0 and above.

excludedFromEnforcement
[]ObjectReference
(Optional)

excludedFromEnforcement defines the list of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace label of origin.

It is only applicable if spec.enforcedNamespaceLabel set to true.

hostNetwork
bool
(Optional)

hostNetwork defines the host’s network namespace if true.

Make sure to understand the security implications if you want to enable it (https://kubernetes.io/docs/concepts/configuration/overview/ ).

When hostNetwork is enabled, this will set the DNS policy to ClusterFirstWithHostNet automatically (unless .spec.DNSPolicy is set to a different value).

podTargetLabels
[]string
(Optional)

podTargetLabels are appended to the spec.podTargetLabels field of all PodMonitor and ServiceMonitor objects.

tracingConfig
PrometheusTracingConfig
(Optional)

tracingConfig defines tracing in Prometheus.

This is an experimental feature, it may change in any upcoming release in a breaking way.

bodySizeLimit
ByteSize
(Optional)

bodySizeLimit defines per-scrape on response body size. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedBodySizeLimit.

sampleLimit
uint64
(Optional)

sampleLimit defines per-scrape limit on number of scraped samples that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedSampleLimit.

targetLimit
uint64
(Optional)

targetLimit defines a limit on the number of scraped targets that will be accepted. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedTargetLimit.

labelLimit
uint64
(Optional)

labelLimit defines per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelLimit.

labelNameLengthLimit
uint64
(Optional)

labelNameLengthLimit defines the per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelNameLengthLimit.

labelValueLengthLimit
uint64
(Optional)

labelValueLengthLimit defines the per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.45.0 and newer.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedLabelValueLengthLimit.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

Note that the global limit only applies to scrape objects that don’t specify an explicit limit value. If you want to enforce a maximum limit for all scrape objects, refer to enforcedKeepDroppedTargets.

reloadStrategy
ReloadStrategyType
(Optional)

reloadStrategy defines the strategy used to reload the Prometheus configuration. If not specified, the configuration is reloaded using the /-/reload HTTP endpoint.

maximumStartupDurationSeconds
int32
(Optional)

maximumStartupDurationSeconds defines the maximum time that the prometheus container’s startup probe will wait before being considered failed. The startup probe will return 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 minutes).

scrapeClasses
[]ScrapeClass
(Optional)

scrapeClasses defines the list of scrape classes to expose to scraping objects such as PodMonitors, ServiceMonitors, Probes and ScrapeConfigs.

This is an experimental feature, it may change in any upcoming release in a breaking way.

serviceDiscoveryRole
ServiceDiscoveryRole
(Optional)

serviceDiscoveryRole defines the service discovery role used to discover targets from ServiceMonitor objects and Alertmanager endpoints.

If set, the value should be either “Endpoints” or “EndpointSlice”. If unset, the operator assumes the “Endpoints” role.

tsdb
TSDBSpec
(Optional)

tsdb defines the runtime reloadable configuration of the timeseries database(TSDB). It requires Prometheus >= v2.39.0 or PrometheusAgent >= v2.54.0.

scrapeFailureLogFile
string
(Optional)

scrapeFailureLogFile defines the file to which scrape failures are logged. Reloading the configuration will reopen the file.

If the filename has an empty path, e.g. ‘file.log’, The Prometheus Pods will mount the file into an emptyDir volume at /var/log/prometheus. If a full path is provided, e.g. ‘/var/log/prometheus/file.log’, you must mount a volume in the specified directory and it must be writable. It requires Prometheus >= v2.55.0.

serviceName
string
(Optional)

serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the Prometheus/PrometheusAgent resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named prometheus-operated for Prometheus resources, or prometheus-agent-operated for PrometheusAgent resources. When deploying multiple Prometheus/PrometheusAgent resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

runtime
RuntimeConfig
(Optional)

runtime defines the values for the Prometheus process behavior

terminationGracePeriodSeconds
int64
(Optional)

terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption.

Defaults to 600 seconds.

hostUsers
bool
(Optional)

hostUsers supports the user space in Kubernetes.

More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/

The feature requires at least Kubernetes 1.28 with the UserNamespacesSupport feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

PuppetDBSDConfig

(Appears on:ScrapeConfigSpec)

PuppetDBSDConfig configurations allow retrieving scrape targets from PuppetDB resources. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#puppetdb_sd_config

Field Description
url
string

url defines the URL of the PuppetDB root query endpoint.

query
string

query defines the Puppet Query Language (PQL) query. Only resources are supported. https://puppet.com/docs/puppetdb/latest/api/query/v4/pql.html

includeParameters
bool
(Optional)

includeParameters defines whether to include the parameters as meta labels. Note: Enabling this exposes parameters in the Prometheus UI and API. Make sure that you don’t have secrets exposed as parameters if you enable this.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request. Cannot be set at the same time as authorization, or oauth2.

authorization
SafeAuthorization
(Optional)

authorization defines the header configuration to authenticate against the DigitalOcean API. Cannot be set at the same time as oauth2.

oauth2
OAuth2
(Optional)

oauth2 defines the optional OAuth 2.0 configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as authorization, or basicAuth.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

PushoverConfig

(Appears on:Receiver)

PushoverConfig configures notifications via Pushover. See https://prometheus.io/docs/alerting/latest/configuration/#pushover_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

userKey
Kubernetes core/v1.SecretKeySelector
(Optional)

userKey defines the secret’s key that contains the recipient user’s user key. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator. Either userKey or userKeyFile is required.

userKeyFile
string
(Optional)

userKeyFile defines the user key file that contains the recipient user’s user key. Either userKey or userKeyFile is required. It requires Alertmanager >= v0.26.0.

token
Kubernetes core/v1.SecretKeySelector
(Optional)

token defines the secret’s key that contains the registered application’s API token. See https://pushover.net/apps for application registration. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator. Either token or tokenFile is required.

tokenFile
string
(Optional)

tokenFile defines the token file that contains the registered application’s API token. See https://pushover.net/apps for application registration. Either token or tokenFile is required. It requires Alertmanager >= v0.26.0.

title
string
(Optional)

title defines the notification title displayed in the Pushover message. This appears as the bold header text in the notification.

message
string
(Optional)

message defines the notification message content. This is the main body text of the Pushover notification.

url
string
(Optional)

url defines a supplementary URL shown alongside the message. This creates a clickable link within the Pushover notification.

urlTitle
string
(Optional)

urlTitle defines a title for the supplementary URL. If not specified, the raw URL is shown instead.

ttl
Duration
(Optional)

ttl defines the time to live for the alert notification. This determines how long the notification remains active before expiring.

device
string
(Optional)

device defines the name of a specific device to send the notification to. If not specified, the notification is sent to all user’s devices.

sound
string
(Optional)

sound defines the name of one of the sounds supported by device clients. This overrides the user’s default sound choice for this notification.

priority
string
(Optional)

priority defines the notification priority level. See https://pushover.net/api#priority for valid values and behavior.

retry
string
(Optional)

retry defines how often the Pushover servers will send the same notification to the user. Must be at least 30 seconds. Only applies to priority 2 notifications.

expire
string
(Optional)

expire defines how long your notification will continue to be retried for, unless the user acknowledges the notification. Only applies to priority 2 notifications.

html
bool
(Optional)

html defines whether notification message is HTML or plain text. When true, the message can include HTML formatting tags.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for Pushover API requests.

Receiver

(Appears on:AlertmanagerConfigSpec)

Receiver defines one or more notification integrations.

Field Description
name
string

name defines the name of the receiver. Must be unique across all items from the list.

opsgenieConfigs
[]OpsGenieConfig
(Optional)

opsgenieConfigs defines the list of OpsGenie configurations.

pagerdutyConfigs
[]PagerDutyConfig
(Optional)

pagerdutyConfigs defines the List of PagerDuty configurations.

discordConfigs
[]DiscordConfig
(Optional)

discordConfigs defines the list of Slack configurations.

slackConfigs
[]SlackConfig
(Optional)

slackConfigs defines the list of Slack configurations.

webhookConfigs
[]WebhookConfig
(Optional)

webhookConfigs defines the List of webhook configurations.

wechatConfigs
[]WeChatConfig
(Optional)

wechatConfigs defines the list of WeChat configurations.

emailConfigs
[]EmailConfig
(Optional)

emailConfigs defines the list of Email configurations.

victoropsConfigs
[]VictorOpsConfig
(Optional)

victoropsConfigs defines the list of VictorOps configurations.

pushoverConfigs
[]PushoverConfig
(Optional)

pushoverConfigs defines the list of Pushover configurations.

snsConfigs
[]SNSConfig
(Optional)

snsConfigs defines the list of SNS configurations

telegramConfigs
[]TelegramConfig
(Optional)

telegramConfigs defines the list of Telegram configurations.

webexConfigs
[]WebexConfig
(Optional)

webexConfigs defines the list of Webex configurations.

msteamsConfigs
[]MSTeamsConfig
(Optional)

msteamsConfigs defines the list of MSTeams configurations. It requires Alertmanager >= 0.26.0.

msteamsv2Configs
[]MSTeamsV2Config
(Optional)

msteamsv2Configs defines the list of MSTeamsV2 configurations. It requires Alertmanager >= 0.28.0.

rocketchatConfigs
[]RocketChatConfig
(Optional)

rocketchatConfigs defines the list of RocketChat configurations. It requires Alertmanager >= 0.28.0.

RocketChatActionConfig

(Appears on:RocketChatConfig)

RocketChatActionConfig defines actions for RocketChat messages.

Field Description
text
string
(Optional)

text defines the button text displayed to users. This is the label that appears on the interactive button.

url
URL
(Optional)

url defines the URL the button links to when clicked. This creates a clickable button that opens the specified URL.

msg
string
(Optional)

msg defines the message to send when the button is clicked. This allows the button to post a predefined message to the channel.

RocketChatConfig

(Appears on:Receiver)

RocketChatConfig configures notifications via RocketChat. It requires Alertmanager >= 0.28.0.

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
URL
(Optional)

apiURL defines the API URL for RocketChat. Defaults to https://open.rocket.chat/ if not specified.

channel
string
(Optional)

channel defines the channel to send alerts to. This can be a channel name (e.g., “#alerts”) or a direct message recipient.

token
Kubernetes core/v1.SecretKeySelector

token defines the sender token for RocketChat authentication. This is the personal access token or bot token used to authenticate API requests.

tokenID
Kubernetes core/v1.SecretKeySelector

tokenID defines the sender token ID for RocketChat authentication. This is the user ID associated with the token used for API requests.

color
string
(Optional)

color defines the message color displayed in RocketChat. This appears as a colored bar alongside the message.

emoji
string
(Optional)

emoji defines the emoji to be displayed as an avatar. If provided, this emoji will be used instead of the default avatar or iconURL.

iconURL
URL
(Optional)

iconURL defines the icon URL for the message avatar. This displays a custom image as the message sender’s avatar.

text
string
(Optional)

text defines the message text to send. This is optional because attachments can be used instead of or alongside text.

title
string
(Optional)

title defines the message title displayed prominently in the message. This appears as bold text at the top of the message attachment.

titleLink
string
(Optional)

titleLink defines the URL that the title will link to when clicked. This makes the message title clickable in the RocketChat interface.

fields
[]RocketChatFieldConfig
(Optional)

fields defines additional fields for the message attachment. These appear as structured key-value pairs within the message.

shortFields
bool
(Optional)

shortFields defines whether to use short fields in the message layout. When true, fields may be displayed side by side to save space.

imageURL
URL
(Optional)

imageURL defines the image URL to display within the message. This embeds an image directly in the message attachment.

thumbURL
URL
(Optional)

thumbURL defines the thumbnail URL for the message. This displays a small thumbnail image alongside the message content.

linkNames
bool
(Optional)

linkNames defines whether to enable automatic linking of usernames and channels. When true, @username and #channel references become clickable links.

actions
[]RocketChatActionConfig
(Optional)

actions defines interactive actions to include in the message. These appear as buttons that users can click to trigger responses.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for RocketChat API requests.

RocketChatFieldConfig

(Appears on:RocketChatConfig)

RocketChatFieldConfig defines additional fields for RocketChat messages.

Field Description
title
string
(Optional)

title defines the title of this field. This appears as bold text labeling the field content.

value
string
(Optional)

value defines the value of this field, displayed underneath the title. This contains the actual data or content for the field.

short
bool
(Optional)

short defines whether this field should be a short field. When true, the field may be displayed inline with other short fields to save space.

Route

(Appears on:AlertmanagerConfigSpec)

Route defines a node in the routing tree.

Field Description
receiver
string
(Optional)

receiver defines the name of the receiver for this route. If not empty, it should be listed in the receivers field.

groupBy
[]string
(Optional)

groupBy defines the list of labels to group by. Labels must not be repeated (unique list). Special label “…” (aggregate by all possible labels), if provided, must be the only element in the list.

groupWait
string
(Optional)

groupWait defines how long to wait before sending the initial notification. Must match the regular expression^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ Example: “30s”

groupInterval
string
(Optional)

groupInterval defines how long to wait before sending an updated notification. Must match the regular expression^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ Example: “5m”

repeatInterval
string
(Optional)

repeatInterval defines how long to wait before repeating the last notification. Must match the regular expression^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ Example: “4h”

matchers
[]Matcher
(Optional)

matchers defines the list of matchers that the alert’s labels should match. For the first level route, the operator removes any existing equality and regexp matcher on the namespace label and adds a namespace: <object namespace> matcher.

continue
bool
(Optional)

continue defines the boolean indicating whether an alert should continue matching subsequent sibling nodes. It will always be overridden to true for the first-level route by the Prometheus operator.

routes
[]k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON
(Optional)

routes defines the child routes.

muteTimeIntervals
[]string
(Optional)

muteTimeIntervals is a list of MuteTimeInterval names that will mute this route when matched,

activeTimeIntervals
[]string
(Optional)

activeTimeIntervals is a list of MuteTimeInterval names when this route should be active.

SDFile (string alias)

(Appears on:FileSDConfig)

SDFile represents a file used for service discovery

SNSConfig

(Appears on:Receiver)

SNSConfig configures notifications via AWS SNS. See https://prometheus.io/docs/alerting/latest/configuration/#sns_configs

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
string
(Optional)

apiURL defines the SNS API URL, e.g. https://sns.us-east-2.amazonaws.com. If not specified, the SNS API URL from the SNS SDK will be used.

sigv4
Sigv4
(Optional)

sigv4 configures AWS’s Signature Verification 4 signing process to sign requests. This includes AWS credentials and region configuration for authentication.

topicARN
string
(Optional)

topicARN defines the SNS topic ARN, e.g. arn:aws:sns:us-east-2:698519295917:My-Topic. If you don’t specify this value, you must specify a value for the PhoneNumber or TargetARN.

subject
string
(Optional)

subject defines the subject line when the message is delivered to email endpoints. This field is only used when sending to email subscribers of an SNS topic.

phoneNumber
string
(Optional)

phoneNumber defines the phone number if message is delivered via SMS in E.164 format. If you don’t specify this value, you must specify a value for the TopicARN or TargetARN.

targetARN
string
(Optional)

targetARN defines the mobile platform endpoint ARN if message is delivered via mobile notifications. If you don’t specify this value, you must specify a value for the TopicARN or PhoneNumber.

message
string
(Optional)

message defines the message content of the SNS notification. This is the actual notification text that will be sent to subscribers.

attributes
map[string]string
(Optional)

attributes defines SNS message attributes as key-value pairs. These provide additional metadata that can be used for message filtering and routing.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for SNS API requests.

ScalewayRole (string alias)

(Appears on:ScalewaySDConfig)

Role of the targets to retrieve. Must be Instance or Baremetal.

Value Description

"Baremetal"

"Instance"

ScalewaySDConfig

(Appears on:ScrapeConfigSpec)

ScalewaySDConfig configurations allow retrieving scrape targets from Scaleway instances and baremetal services. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scaleway_sd_config TODO: Need to document that we will not be supporting the _file fields.

Field Description
accessKey
string

accessKey defines the access key to use. https://console.scaleway.com/project/credentials

secretKey
Kubernetes core/v1.SecretKeySelector

secretKey defines the secret key to use when listing targets.

projectID
string

projectID defines the Project ID of the targets.

role
ScalewayRole

role defines the service of the targets to retrieve. Must be Instance or Baremetal.

port
int32
(Optional)

port defines the port to scrape metrics from. If using the public IP address, this must

apiURL
string
(Optional)

apiURL defines the API URL to use when doing the server listing requests.

zone
string
(Optional)

zone defines the availability zone of your targets (e.g. fr-par-1).

nameFilter
string
(Optional)

nameFilter defines a name filter (works as a LIKE) to apply on the server listing request.

tagsFilter
[]string
(Optional)

tagsFilter defines a tag filter (a server needs to have all defined tags to be listed) to apply on the server listing request.

refreshInterval
Duration
(Optional)

refreshInterval defines the time after which the provided names are refreshed. If not set, Prometheus uses its default value.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to connect to the Consul API.

ScrapeConfigSpec

(Appears on:ScrapeConfig)

ScrapeConfigSpec is a specification of the desired configuration for a scrape configuration.

Field Description
jobName
string
(Optional)

jobName defines the value of the job label assigned to the scraped metrics by default.

The job_name field in the rendered scrape configuration is always controlled by the operator to prevent duplicate job names, which Prometheus does not allow. Instead the job label is set by means of relabeling configs.

staticConfigs
[]StaticConfig
(Optional)

staticConfigs defines a list of static targets with a common label set.

fileSDConfigs
[]FileSDConfig
(Optional)

fileSDConfigs defines a list of file service discovery configurations.

httpSDConfigs
[]HTTPSDConfig
(Optional)

httpSDConfigs defines a list of HTTP service discovery configurations.

kubernetesSDConfigs
[]KubernetesSDConfig
(Optional)

kubernetesSDConfigs defines a list of Kubernetes service discovery configurations.

consulSDConfigs
[]ConsulSDConfig
(Optional)

consulSDConfigs defines a list of Consul service discovery configurations.

dnsSDConfigs
[]DNSSDConfig
(Optional)

dnsSDConfigs defines a list of DNS service discovery configurations.

ec2SDConfigs
[]EC2SDConfig
(Optional)

ec2SDConfigs defines a list of EC2 service discovery configurations.

azureSDConfigs
[]AzureSDConfig
(Optional)

azureSDConfigs defines a list of Azure service discovery configurations.

gceSDConfigs
[]GCESDConfig
(Optional)

gceSDConfigs defines a list of GCE service discovery configurations.

openstackSDConfigs
[]OpenStackSDConfig
(Optional)

openstackSDConfigs defines a list of OpenStack service discovery configurations.

digitalOceanSDConfigs
[]DigitalOceanSDConfig
(Optional)

digitalOceanSDConfigs defines a list of DigitalOcean service discovery configurations.

kumaSDConfigs
[]KumaSDConfig
(Optional)

kumaSDConfigs defines a list of Kuma service discovery configurations.

eurekaSDConfigs
[]EurekaSDConfig
(Optional)

eurekaSDConfigs defines a list of Eureka service discovery configurations.

dockerSDConfigs
[]DockerSDConfig
(Optional)

dockerSDConfigs defines a list of Docker service discovery configurations.

linodeSDConfigs
[]LinodeSDConfig
(Optional)

linodeSDConfigs defines a list of Linode service discovery configurations.

hetznerSDConfigs
[]HetznerSDConfig
(Optional)

hetznerSDConfigs defines a list of Hetzner service discovery configurations.

nomadSDConfigs
[]NomadSDConfig
(Optional)

nomadSDConfigs defines a list of Nomad service discovery configurations.

dockerSwarmSDConfigs
[]DockerSwarmSDConfig
(Optional)

dockerSwarmSDConfigs defines a list of Dockerswarm service discovery configurations.

puppetDBSDConfigs
[]PuppetDBSDConfig
(Optional)

puppetDBSDConfigs defines a list of PuppetDB service discovery configurations.

lightSailSDConfigs
[]LightSailSDConfig
(Optional)

lightSailSDConfigs defines a list of Lightsail service discovery configurations.

ovhcloudSDConfigs
[]OVHCloudSDConfig
(Optional)

ovhcloudSDConfigs defines a list of OVHcloud service discovery configurations.

scalewaySDConfigs
[]ScalewaySDConfig
(Optional)

scalewaySDConfigs defines a list of Scaleway instances and baremetal service discovery configurations.

ionosSDConfigs
[]IonosSDConfig
(Optional)

ionosSDConfigs defines a list of IONOS service discovery configurations.

relabelings
[]RelabelConfig
(Optional)

relabelings defines how to rewrite the target’s labels before scraping. Prometheus 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

metricsPath
string
(Optional)

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

scrapeInterval
Duration
(Optional)

scrapeInterval defines the interval between consecutive scrapes.

scrapeTimeout
Duration
(Optional)

scrapeTimeout defines the number of seconds to wait until a scrape request times out. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

scrapeProtocols
[]ScrapeProtocol
(Optional)

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.

fallbackScrapeProtocol
ScrapeProtocol
(Optional)

fallbackScrapeProtocol defines the protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.

It requires Prometheus >= v3.0.0.

honorTimestamps
bool
(Optional)

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

trackTimestampsStaleness
bool
(Optional)

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.

honorLabels
bool
(Optional)

honorLabels defines when true the metric’s labels when they collide with the target’s labels.

params
map[string][]string
(Optional)

params defines optional HTTP URL parameters

scheme
string
(Optional)

scheme defines the protocol scheme used for requests. If empty, Prometheus uses HTTP by default.

enableCompression
bool
(Optional)

enableCompression when false, Prometheus will request uncompressed response from the scraped target.

It requires Prometheus >= v2.49.0.

If unset, Prometheus uses true by default.

enableHTTP2
bool
(Optional)

enableHTTP2 defines whether to enable HTTP2.

basicAuth
BasicAuth
(Optional)

basicAuth defines information to use on every scrape request.

authorization
SafeAuthorization
(Optional)

authorization defines the header to use on every scrape request.

oauth2
OAuth2
(Optional)

oauth2 defines the configuration to use on every scrape request.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration to use on every scrape request

sampleLimit
uint64
(Optional)

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

targetLimit
uint64
(Optional)

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

labelLimit
uint64
(Optional)

labelLimit defines the 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
uint64
(Optional)

labelNameLengthLimit defines the 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
uint64
(Optional)

labelValueLengthLimit defines the 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.

scrapeClassicHistograms
bool
(Optional)

scrapeClassicHistograms defines whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0.

Notice: scrapeClassicHistograms corresponds to the always_scrape_classic_histograms field in the Prometheus configuration.

nativeHistogramBucketLimit
uint64
(Optional)

nativeHistogramBucketLimit defines ff there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0.

nativeHistogramMinBucketFactor
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

nativeHistogramMinBucketFactor defines if the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0.

convertClassicHistogramsToNHCB
bool
(Optional)

convertClassicHistogramsToNHCB defines whether to convert all scraped classic histograms into a native histogram with custom buckets. It requires Prometheus >= v3.0.0.

keepDroppedTargets
uint64
(Optional)

keepDroppedTargets defines the 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.

metricRelabelings
[]RelabelConfig
(Optional)

metricRelabelings defines the metricRelabelings to apply to samples before ingestion.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

nameValidationScheme
NameValidationSchemeOptions
(Optional)

nameValidationScheme defines the validation scheme for metric and label names.

It requires Prometheus >= v3.0.0.

nameEscapingScheme
NameEscapingSchemeOptions
(Optional)

nameEscapingScheme defines the metric name escaping mode to request through content negotiation.

It requires Prometheus >= v3.4.0.

scrapeClass
string
(Optional)

scrapeClass defines the scrape class to apply.

SlackAction

(Appears on:SlackConfig)

SlackAction configures a single Slack action that is sent with each notification. See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons for more information.

Field Description
type
string

type defines the type of interactive component. Common values include “button” for clickable buttons and “select” for dropdown menus.

text
string

text defines the user-visible label displayed on the action element. For buttons, this is the button text. For select menus, this is the placeholder text.

url
string
(Optional)

url defines the URL to open when the action is triggered. Only applicable for button-type actions. When set, clicking the button opens this URL.

style
string
(Optional)

style defines the visual appearance of the action element. Valid values include “default”, “primary” (green), and “danger” (red).

name
string
(Optional)

name defines a unique identifier for the action within the message. This value is sent back to your application when the action is triggered.

value
string
(Optional)

value defines the payload sent when the action is triggered. This data is included in the callback sent to your application.

confirm
SlackConfirmationField
(Optional)

confirm defines an optional confirmation dialog that appears before the action is executed. When set, users must confirm their intent before the action proceeds.

SlackConfig

(Appears on:Receiver)

SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
Kubernetes core/v1.SecretKeySelector
(Optional)

apiURL defines the secret’s key that contains the Slack webhook URL. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

channel
string
(Optional)

channel defines the channel or user to send notifications to.

username
string
(Optional)

username defines the slack bot user name.

color
string
(Optional)

color defines the color of the left border of the Slack message attachment. Can be a hex color code (e.g., “#ff0000”) or a predefined color name.

title
string
(Optional)

title defines the title text displayed in the Slack message attachment.

titleLink
string
(Optional)

titleLink defines the URL that the title will link to when clicked.

pretext
string
(Optional)

pretext defines optional text that appears above the message attachment block.

text
string
(Optional)

text defines the main text content of the Slack message attachment.

fields
[]SlackField
(Optional)

fields defines a list of Slack fields that are sent with each notification.

shortFields
bool
(Optional)

shortFields determines whether fields are displayed in a compact format. When true, fields are shown side by side when possible.

footer
string
(Optional)

footer defines small text displayed at the bottom of the message attachment.

fallback
string
(Optional)

fallback defines a plain-text summary of the attachment for clients that don’t support attachments.

callbackId
string
(Optional)

callbackId defines an identifier for the message used in interactive components.

iconEmoji
string
(Optional)

iconEmoji defines the emoji to use as the bot’s avatar (e.g., “👻”).

iconURL
string
(Optional)

iconURL defines the URL to an image to use as the bot’s avatar.

imageURL
string
(Optional)

imageURL defines the URL to an image file that will be displayed inside the message attachment.

thumbURL
string
(Optional)

thumbURL defines the URL to an image file that will be displayed as a thumbnail on the right side of the message attachment.

linkNames
bool
(Optional)

linkNames enables automatic linking of channel names and usernames in the message. When true, @channel and @username will be converted to clickable links.

mrkdwnIn
[]string
(Optional)

mrkdwnIn defines which fields should be parsed as Slack markdown. Valid values include “pretext”, “text”, and “fields”.

actions
[]SlackAction
(Optional)

actions defines a list of Slack actions that are sent with each notification.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration.

SlackConfirmationField

(Appears on:SlackAction)

SlackConfirmationField protect users from destructive actions or particularly distinguished decisions by asking them to confirm their button click one more time. See https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.

Field Description
text
string

text defines the main message displayed in the confirmation dialog. This should be a clear question or statement asking the user to confirm their action.

title
string
(Optional)

title defines the title text displayed at the top of the confirmation dialog. When not specified, a default title will be used.

okText
string
(Optional)

okText defines the label for the confirmation button in the dialog. When not specified, defaults to “Okay”. This button proceeds with the action.

dismissText
string
(Optional)

dismissText defines the label for the cancel button in the dialog. When not specified, defaults to “Cancel”. This button cancels the action.

SlackField

(Appears on:SlackConfig)

SlackField configures a single Slack field that is sent with each notification. Each field must contain a title, value, and optionally, a boolean value to indicate if the field is short enough to be displayed next to other fields designated as short. See https://api.slack.com/docs/message-attachments#fields for more information.

Field Description
title
string

title defines the label or header text displayed for this field. This appears as bold text above the field value in the Slack message.

value
string

value defines the content or data displayed for this field. This appears below the title and can contain plain text or Slack markdown.

short
bool
(Optional)

short determines whether this field can be displayed alongside other short fields. When true, Slack may display this field side by side with other short fields. When false or not specified, the field takes the full width of the message.

StaticConfig

(Appears on:ScrapeConfigSpec)

StaticConfig defines a Prometheus static configuration. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config

Field Description
targets
[]Target

targets defines the list of targets for this static configuration.

labels
map[string]string
(Optional)

labels defines labels assigned to all metrics scraped from the targets.

Target (string alias)

(Appears on:StaticConfig)

Target represents a target for Prometheus to scrape kubebuilder:validation:MinLength:=1

TelegramConfig

(Appears on:Receiver)

TelegramConfig configures notifications via Telegram. See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
string
(Optional)

apiURL defines the Telegram API URL, e.g. https://api.telegram.org. If not specified, the default Telegram API URL will be used.

botToken
Kubernetes core/v1.SecretKeySelector
(Optional)

botToken defines the Telegram bot token. It is mutually exclusive with botTokenFile. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator. Either botToken or botTokenFile is required.

botTokenFile
string
(Optional)

botTokenFile defines the file to read the Telegram bot token from. It is mutually exclusive with botToken. Either botToken or botTokenFile is required. It requires Alertmanager >= v0.26.0.

chatID
int64

chatID defines the Telegram chat ID where messages will be sent. This can be a user ID, group ID, or channel ID (with @ prefix for public channels).

messageThreadID
int64
(Optional)

messageThreadID defines the Telegram Group Topic ID for threaded messages. This allows sending messages to specific topics within Telegram groups. It requires Alertmanager >= 0.26.0.

message
string
(Optional)

message defines the message template for the Telegram notification. This is the content that will be sent to the specified chat.

disableNotifications
bool
(Optional)

disableNotifications controls whether Telegram notifications are sent silently. When true, users will receive the message without notification sounds.

parseMode
string
(Optional)

parseMode defines the parse mode for telegram message formatting. Valid values are “MarkdownV2”, “Markdown”, and “HTML”. This determines how text formatting is interpreted in the message.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for Telegram API requests.

Time (string alias)

(Appears on:TimeRange)

Time defines a time in 24hr format

TimeInterval

(Appears on:MuteTimeInterval)

TimeInterval describes intervals of time

Field Description
times
[]TimeRange
(Optional)

times defines a list of TimeRange

weekdays
[]WeekdayRange
(Optional)

weekdays defines a list of WeekdayRange

daysOfMonth
[]DayOfMonthRange
(Optional)

daysOfMonth defines a list of DayOfMonthRange

months
[]MonthRange
(Optional)

months defines a list of MonthRange

years
[]YearRange
(Optional)

years defines a list of YearRange

TimeRange

(Appears on:TimeInterval)

TimeRange defines a start and end time in 24hr format

Field Description
startTime
Time
(Optional)

startTime defines the start time in 24hr format.

endTime
Time
(Optional)

endTime defines the end time in 24hr format.

URL (string alias)

(Appears on:DiscordConfig, RocketChatActionConfig, RocketChatConfig, WebexConfig)

URL represents a valid URL

VictorOpsConfig

(Appears on:Receiver)

VictorOpsConfig configures notifications via VictorOps. See https://prometheus.io/docs/alerting/latest/configuration/#victorops_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiKey
Kubernetes core/v1.SecretKeySelector
(Optional)

apiKey defines the secret’s key that contains the API key to use when talking to the VictorOps API. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

apiUrl
string
(Optional)

apiUrl defines the VictorOps API URL. When not specified, defaults to the standard VictorOps API endpoint.

routingKey
string
(Optional)

routingKey defines a key used to map the alert to a team. This determines which VictorOps team will receive the alert notification.

messageType
string
(Optional)

messageType describes the behavior of the alert. Valid values are “CRITICAL”, “WARNING”, and “INFO”.

entityDisplayName
string
(Optional)

entityDisplayName contains a summary of the alerted problem. This appears as the main title or identifier for the incident.

stateMessage
string
(Optional)

stateMessage contains a long explanation of the alerted problem. This provides detailed context about the incident.

monitoringTool
string
(Optional)

monitoringTool defines the monitoring tool the state message is from. This helps identify the source system that generated the alert.

customFields
[]KeyValue
(Optional)

customFields defines additional custom fields for notification. These provide extra metadata that will be included with the VictorOps incident.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client’s configuration for VictorOps API requests.

WeChatConfig

(Appears on:Receiver)

WeChatConfig configures notifications via WeChat. See https://prometheus.io/docs/alerting/latest/configuration/#wechat_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

apiSecret defines the secret’s key that contains the WeChat API key. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

apiURL
string
(Optional)

apiURL defines the WeChat API URL. When not specified, defaults to the standard WeChat Work API endpoint.

corpID
string
(Optional)

corpID defines the corp id for authentication. This is the unique identifier for your WeChat Work organization.

agentID
string
(Optional)

agentID defines the application agent ID within WeChat Work. This identifies which WeChat Work application will send the notifications.

toUser
string
(Optional)

toUser defines the target user(s) to receive the notification. Can be a single user ID or multiple user IDs separated by ‘|’.

toParty
string
(Optional)

toParty defines the target department(s) to receive the notification. Can be a single department ID or multiple department IDs separated by ‘|’.

toTag
string
(Optional)

toTag defines the target tag(s) to receive the notification. Can be a single tag ID or multiple tag IDs separated by ‘|’.

message
string
(Optional)

message defines the API request data as defined by the WeChat API. This contains the actual notification content to be sent.

messageType
string
(Optional)

messageType defines the type of message to send. Valid values include “text”, “markdown”, and other WeChat Work supported message types.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for WeChat API requests.

WebexConfig

(Appears on:Receiver)

WebexConfig configures notification via Cisco Webex See https://prometheus.io/docs/alerting/latest/configuration/#webex_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
URL
(Optional)

apiURL defines the Webex Teams API URL i.e. https://webexapis.com/v1/messages

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client’s configuration.

message
string
(Optional)

message defines the message template

roomID
string

roomID defines the ID of the Webex Teams room where to send the messages.

WebhookConfig

(Appears on:Receiver)

WebhookConfig configures notifications via a generic receiver supporting the webhook payload. See https://prometheus.io/docs/alerting/latest/configuration/#webhook_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

url
string
(Optional)

url defines the URL to send HTTP POST requests to. urlSecret takes precedence over url. One of urlSecret and url should be defined.

urlSecret
Kubernetes core/v1.SecretKeySelector
(Optional)

urlSecret defines the secret’s key that contains the webhook URL to send HTTP requests to. urlSecret takes precedence over url. One of urlSecret and url should be defined. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for webhook requests.

maxAlerts
int32
(Optional)

maxAlerts defines the maximum number of alerts to be sent per webhook message. When 0, all alerts are included in the webhook payload.

timeout
Duration
(Optional)

timeout defines the maximum time to wait for a webhook request to complete, before failing the request and allowing it to be retried. It requires Alertmanager >= v0.28.0.

Weekday (string alias)

Weekday is day of the week

Value Description

"friday"

"monday"

"saturday"

"sunday"

"thursday"

"tuesday"

"wednesday"

WeekdayRange (string alias)

(Appears on:TimeInterval)

WeekdayRange is an inclusive range of days of the week beginning on Sunday Days can be specified by name (e.g ‘Sunday’) or as an inclusive range (e.g ‘Monday:Friday’)

YearRange (string alias)

(Appears on:TimeInterval)

YearRange is an inclusive range of years


monitoring.coreos.com/v1beta1

Resource Types:

AlertmanagerConfig

The AlertmanagerConfig custom resource definition (CRD) defines how Alertmanager objects process Prometheus alerts. It allows to specify alert grouping and routing, notification receivers and inhibition rules.

Alertmanager objects select AlertmanagerConfig objects using label and namespace selectors.

Field Description
apiVersion
string
monitoring.coreos.com/v1beta1
kind
string
AlertmanagerConfig
metadata
Kubernetes meta/v1.ObjectMeta
(Optional)

metadata defines ObjectMeta as the metadata that all persisted resources.

Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
AlertmanagerConfigSpec

spec defines the specification of AlertmanagerConfigSpec



route
Route
(Optional)

route defines the Alertmanager route definition for alerts matching the resource’s namespace. If present, it will be added to the generated Alertmanager configuration as a first-level route.

receivers
[]Receiver
(Optional)

receivers defines the list of receivers.

inhibitRules
[]InhibitRule
(Optional)

inhibitRules defines the list of inhibition rules. The rules will only apply to alerts matching the resource’s namespace.

timeIntervals
[]TimeInterval
(Optional)

timeIntervals defines the list of timeIntervals specifying when the routes should be muted.

AlertmanagerConfigSpec

(Appears on:AlertmanagerConfig)

AlertmanagerConfigSpec is a specification of the desired behavior of the Alertmanager configuration. By definition, the Alertmanager configuration only applies to alerts for which the namespace label is equal to the namespace of the AlertmanagerConfig resource.

Field Description
route
Route
(Optional)

route defines the Alertmanager route definition for alerts matching the resource’s namespace. If present, it will be added to the generated Alertmanager configuration as a first-level route.

receivers
[]Receiver
(Optional)

receivers defines the list of receivers.

inhibitRules
[]InhibitRule
(Optional)

inhibitRules defines the list of inhibition rules. The rules will only apply to alerts matching the resource’s namespace.

timeIntervals
[]TimeInterval
(Optional)

timeIntervals defines the list of timeIntervals specifying when the routes should be muted.

DayOfMonthRange

(Appears on:TimePeriod)

DayOfMonthRange is an inclusive range of days of the month beginning at 1

Field Description
start
int
(Optional)

start of the inclusive range

end
int
(Optional)

end of the inclusive range

DiscordConfig

(Appears on:Receiver)

DiscordConfig configures notifications via Discord. See https://prometheus.io/docs/alerting/latest/configuration/#discord_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
Kubernetes core/v1.SecretKeySelector

apiURL defines the secret’s key that contains the Discord webhook URL. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

title
string
(Optional)

title defines the template of the message’s title.

message
string
(Optional)

message defines the template of the message’s body.

content
string
(Optional)

content defines the template of the content’s body.

username
string
(Optional)

username defines the username of the message sender.

avatarURL
URL
(Optional)

avatarURL defines the avatar url of the message sender.

httpConfig
HTTPConfig
(Optional)

httpConfig defines HTTP client configuration.

EmailConfig

(Appears on:Receiver)

EmailConfig configures notifications via Email.

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

to
string
(Optional)

to defines the email address to send notifications to. This is the recipient address for alert notifications.

from
string
(Optional)

from defines the sender address for email notifications. This appears as the “From” field in the email header.

hello
string
(Optional)

hello defines the hostname to identify to the SMTP server. This is used in the SMTP HELO/EHLO command during the connection handshake.

smarthost
string
(Optional)

smarthost defines the SMTP host and port through which emails are sent. Format should be “hostname:port”, e.g. “smtp.example.com:587”.

authUsername
string
(Optional)

authUsername defines the username to use for SMTP authentication. This is used for SMTP AUTH when the server requires authentication.

authPassword
SecretKeySelector
(Optional)

authPassword defines the secret’s key that contains the password to use for authentication. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

authSecret
SecretKeySelector
(Optional)

authSecret defines the secret’s key that contains the CRAM-MD5 secret. This is used for CRAM-MD5 authentication mechanism. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

authIdentity
string
(Optional)

authIdentity defines the identity to use for SMTP authentication. This is typically used with PLAIN authentication mechanism.

headers
[]KeyValue
(Optional)

headers defines additional email header key/value pairs. These override any headers previously set by the notification implementation.

html
string
(Optional)

html defines the HTML body of the email notification. This allows for rich formatting in the email content.

text
string
(Optional)

text defines the plain text body of the email notification. This provides a fallback for email clients that don’t support HTML.

requireTLS
bool
(Optional)

requireTLS defines the SMTP TLS requirement. Note that Go does not support unencrypted connections to remote SMTP endpoints.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration for SMTP connections. This includes settings for certificates, CA validation, and TLS protocol options.

HTTPConfig

(Appears on:DiscordConfig, MSTeamsConfig, MSTeamsV2Config, OpsGenieConfig, PagerDutyConfig, PushoverConfig, RocketChatConfig, SNSConfig, SlackConfig, TelegramConfig, VictorOpsConfig, WeChatConfig, WebexConfig, WebhookConfig)

HTTPConfig defines a client HTTP configuration. See https://prometheus.io/docs/alerting/latest/configuration/#http_config

Field Description
authorization
SafeAuthorization
(Optional)

authorization defines the authorization header configuration for the client. This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+.

basicAuth
BasicAuth
(Optional)

basicAuth defines the basic authentication credentials for the client. This is mutually exclusive with Authorization. If both are defined, BasicAuth takes precedence.

oauth2
OAuth2
(Optional)

oauth2 defines the OAuth2 client credentials used to fetch a token for the targets. This enables OAuth2 authentication flow for HTTP requests.

bearerTokenSecret
SecretKeySelector
(Optional)

bearerTokenSecret defines the secret’s key that contains the bearer token to be used by the client for authentication. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

tlsConfig
SafeTLSConfig
(Optional)

tlsConfig defines the TLS configuration for the client. This includes settings for certificates, CA validation, and TLS protocol options.

proxyURL
string
(Optional)

proxyURL defines an optional proxy URL for HTTP requests. If defined, this field takes precedence over proxyUrl.

proxyUrl
string
(Optional)

proxyUrl defines the HTTP proxy server to use.

noProxy
string
(Optional)

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.

proxyFromEnvironment
bool
(Optional)

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.

proxyConnectHeader
map[string][]Kubernetes core/v1.SecretKeySelector
(Optional)

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.

followRedirects
bool
(Optional)

followRedirects defines whether HTTP requests follow HTTP 3xx redirects. When true, the client will automatically follow redirect responses.

InhibitRule

(Appears on:AlertmanagerConfigSpec)

InhibitRule defines an inhibition rule that allows to mute alerts when other alerts are already firing. See https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule

Field Description
targetMatch
[]Matcher
(Optional)

targetMatch defines matchers that have to be fulfilled in the alerts to be muted. The operator enforces that the alert matches the resource’s namespace. When these conditions are met, matching alerts will be inhibited (silenced).

sourceMatch
[]Matcher
(Optional)

sourceMatch defines matchers for which one or more alerts have to exist for the inhibition to take effect. The operator enforces that the alert matches the resource’s namespace. These are the “trigger” alerts that cause other alerts to be inhibited.

equal
[]string
(Optional)

equal defines labels that must have an equal value in the source and target alert for the inhibition to take effect. This ensures related alerts are properly grouped.

KeyValue

(Appears on:EmailConfig, OpsGenieConfig, PagerDutyConfig, VictorOpsConfig)

KeyValue defines a (key, value) tuple.

Field Description
key
string

key defines the key of the tuple. This is the identifier or name part of the key-value pair.

value
string

value defines the value of the tuple. This is the data or content associated with the key.

MSTeamsConfig

(Appears on:Receiver)

MSTeamsConfig configures notifications via Microsoft Teams. It requires Alertmanager >= 0.26.0.

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

webhookUrl
Kubernetes core/v1.SecretKeySelector

webhookUrl defines the MSTeams webhook URL for sending notifications. This is the incoming webhook URL configured in your Teams channel.

title
string
(Optional)

title defines the message title template for Teams notifications. This appears as the main heading of the Teams message card.

summary
string
(Optional)

summary defines the message summary template for Teams notifications. This provides a brief overview that appears in Teams notification previews. It requires Alertmanager >= 0.27.0.

text
string
(Optional)

text defines the message body template for Teams notifications. This contains the detailed content of the Teams message.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for Teams webhook requests.

MSTeamsV2Config

(Appears on:Receiver)

MSTeamsV2Config configures notifications via Microsoft Teams using the new message format with adaptive cards as required by flows. See https://prometheus.io/docs/alerting/latest/configuration/#msteamsv2_config It requires Alertmanager >= 0.28.0.

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

webhookURL
Kubernetes core/v1.SecretKeySelector
(Optional)

webhookURL defines the MSTeams incoming webhook URL for adaptive card notifications. This webhook must support the newer adaptive cards format required by Teams flows.

title
string
(Optional)

title defines the message title template for adaptive card notifications. This appears as the main heading in the Teams adaptive card.

text
string
(Optional)

text defines the message body template for adaptive card notifications. This contains the detailed content displayed in the Teams adaptive card format.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for Teams webhook requests.

MatchType (string alias)

(Appears on:Matcher)

MatchType is a comparison operator on a Matcher

Value Description

"="

"!="

"!~"

"=~"

Matcher

(Appears on:InhibitRule, Route)

Matcher defines how to match on alert’s labels.

Field Description
name
string

name defines the label to match. This specifies which alert label should be evaluated.

value
string
(Optional)

value defines the label value to match. This is the expected value for the specified label.

matchType
MatchType
(Optional)

matchType defines the match operation available with AlertManager >= v0.22.0. Takes precedence over Regex (deprecated) if non-empty. Valid values: “=” (equality), “!=” (inequality), “=~” (regex match), “!~” (regex non-match).

Month (string alias)

Month of the year

Value Description

"april"

"august"

"december"

"february"

"january"

"july"

"june"

"march"

"may"

"november"

"october"

"september"

MonthRange (string alias)

(Appears on:TimePeriod)

MonthRange is an inclusive range of months of the year beginning in January Months can be specified by name (e.g ‘January’) by numerical month (e.g ‘1’) or as an inclusive range (e.g ‘January:March’, ‘1:3’, ‘1:March’)

OpsGenieConfig

(Appears on:Receiver)

OpsGenieConfig configures notifications via OpsGenie. See https://prometheus.io/docs/alerting/latest/configuration/#opsgenie_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiKey
SecretKeySelector
(Optional)

apiKey defines the secret’s key that contains the OpsGenie API key. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

apiURL
string
(Optional)

apiURL defines the URL to send OpsGenie API requests to. When not specified, defaults to the standard OpsGenie API endpoint.

message
string
(Optional)

message defines the alert text limited to 130 characters. This appears as the main alert title in OpsGenie.

description
string
(Optional)

description defines the detailed description of the incident. This provides additional context beyond the message field.

source
string
(Optional)

source defines the backlink to the sender of the notification. This helps identify where the alert originated from.

tags
string
(Optional)

tags defines a comma separated list of tags attached to the notifications. These help categorize and filter alerts within OpsGenie.

note
string
(Optional)

note defines an additional alert note. This provides supplementary information about the alert.

priority
string
(Optional)

priority defines the priority level of alert. Possible values are P1, P2, P3, P4, and P5, where P1 is highest priority.

details
[]KeyValue
(Optional)

details defines a set of arbitrary key/value pairs that provide further detail about the incident. These appear as additional fields in the OpsGenie alert.

responders
[]OpsGenieConfigResponder
(Optional)

responders defines the list of responders responsible for notifications. These determine who gets notified when the alert is created.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for OpsGenie API requests.

entity
string
(Optional)

entity defines an optional field that can be used to specify which domain alert is related to. This helps group related alerts together in OpsGenie.

actions
string
(Optional)

actions defines a comma separated list of actions that will be available for the alert. These appear as action buttons in the OpsGenie interface.

OpsGenieConfigResponder

(Appears on:OpsGenieConfig)

OpsGenieConfigResponder defines a responder to an incident. One of id, name or username has to be defined.

Field Description
id
string
(Optional)

id defines the unique identifier of the responder. This corresponds to the responder’s ID within OpsGenie.

name
string
(Optional)

name defines the display name of the responder. This is used when the responder is identified by name rather than ID.

username
string
(Optional)

username defines the username of the responder. This is typically used for user-type responders when identifying by username.

type
string

type defines the type of responder. Valid values include “user”, “team”, “schedule”, and “escalation”. This determines how OpsGenie interprets the other identifier fields.

PagerDutyConfig

(Appears on:Receiver)

PagerDutyConfig configures notifications via PagerDuty. See https://prometheus.io/docs/alerting/latest/configuration/#pagerduty_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

routingKey
SecretKeySelector
(Optional)

routingKey defines the secret’s key that contains the PagerDuty integration key (when using Events API v2). Either this field or serviceKey needs to be defined. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

serviceKey
SecretKeySelector
(Optional)

serviceKey defines the secret’s key that contains the PagerDuty service key (when using integration type “Prometheus”). Either this field or routingKey needs to be defined. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

url
string
(Optional)

url defines the URL to send requests to.

client
string
(Optional)

client defines the client identification.

clientURL
string
(Optional)

clientURL defines the backlink to the sender of notification.

description
string
(Optional)

description of the incident.

severity
string
(Optional)

severity of the incident.

class
string
(Optional)

class defines the class/type of the event.

group
string
(Optional)

group defines a cluster or grouping of sources.

component
string
(Optional)

component defines the part or component of the affected system that is broken.

details
[]KeyValue
(Optional)

details defines the arbitrary key/value pairs that provide further detail about the incident.

pagerDutyImageConfigs
[]PagerDutyImageConfig
(Optional)

pagerDutyImageConfigs defines a list of image details to attach that provide further detail about an incident.

pagerDutyLinkConfigs
[]PagerDutyLinkConfig
(Optional)

pagerDutyLinkConfigs defines a list of link details to attach that provide further detail about an incident.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration.

source
string
(Optional)

source defines the unique location of the affected system.

PagerDutyImageConfig

(Appears on:PagerDutyConfig)

PagerDutyImageConfig attaches images to an incident

Field Description
src
string
(Optional)

src of the image being attached to the incident

href
string
(Optional)

href defines the optional URL; makes the image a clickable link.

alt
string
(Optional)

alt is the optional alternative text for the image.

PagerDutyLinkConfig

(Appears on:PagerDutyConfig)

PagerDutyLinkConfig attaches text links to an incident

Field Description
href
string
(Optional)

href defines the URL of the link to be attached

alt
string
(Optional)

alt defines the text that describes the purpose of the link, and can be used as the link’s text.

ParsedRange

ParsedRange is an integer representation of a range

Field Description
start
int
(Optional)

start defines the beginning of the range

end
int
(Optional)

end defines the end of the range

PushoverConfig

(Appears on:Receiver)

PushoverConfig configures notifications via Pushover. See https://prometheus.io/docs/alerting/latest/configuration/#pushover_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

userKey
SecretKeySelector
(Optional)

userKey defines the secret’s key that contains the recipient user’s user key. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator. Either userKey or userKeyFile is required.

userKeyFile
string
(Optional)

userKeyFile defines the user key file that contains the recipient user’s user key. Either userKey or userKeyFile is required. It requires Alertmanager >= v0.26.0.

token
SecretKeySelector
(Optional)

token defines the secret’s key that contains the registered application’s API token. See https://pushover.net/apps for application registration. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator. Either token or tokenFile is required.

tokenFile
string
(Optional)

tokenFile defines the token file that contains the registered application’s API token. See https://pushover.net/apps for application registration. Either token or tokenFile is required. It requires Alertmanager >= v0.26.0.

title
string
(Optional)

title defines the notification title displayed in the Pushover message. This appears as the bold header text in the notification.

message
string
(Optional)

message defines the notification message content. This is the main body text of the Pushover notification.

url
string
(Optional)

url defines a supplementary URL shown alongside the message. This creates a clickable link within the Pushover notification.

urlTitle
string
(Optional)

urlTitle defines a title for the supplementary URL. If not specified, the raw URL is shown instead.

ttl
Duration
(Optional)

ttl defines the time to live for the alert notification. This determines how long the notification remains active before expiring.

device
string
(Optional)

device defines the name of a specific device to send the notification to. If not specified, the notification is sent to all user’s devices.

sound
string
(Optional)

sound defines the name of one of the sounds supported by device clients. This overrides the user’s default sound choice for this notification.

priority
string
(Optional)

priority defines the notification priority level. See https://pushover.net/api#priority for valid values and behavior.

retry
string
(Optional)

retry defines how often the Pushover servers will send the same notification to the user. Must be at least 30 seconds. Only applies to priority 2 notifications.

expire
string
(Optional)

expire defines how long your notification will continue to be retried for, unless the user acknowledges the notification. Only applies to priority 2 notifications.

html
bool
(Optional)

html defines whether notification message is HTML or plain text. When true, the message can include HTML formatting tags.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for Pushover API requests.

Receiver

(Appears on:AlertmanagerConfigSpec)

Receiver defines one or more notification integrations.

Field Description
name
string

name defines the name of the receiver. Must be unique across all items from the list.

opsgenieConfigs
[]OpsGenieConfig
(Optional)

opsgenieConfigs defines the list of OpsGenie configurations.

pagerdutyConfigs
[]PagerDutyConfig
(Optional)

pagerdutyConfigs defines the List of PagerDuty configurations.

discordConfigs
[]DiscordConfig
(Optional)

discordConfigs defines the list of Slack configurations.

slackConfigs
[]SlackConfig
(Optional)

slackConfigs defines the list of Slack configurations.

webhookConfigs
[]WebhookConfig
(Optional)

webhookConfigs defines the List of webhook configurations.

wechatConfigs
[]WeChatConfig
(Optional)

wechatConfigs defines the list of WeChat configurations.

emailConfigs
[]EmailConfig
(Optional)

emailConfigs defines the list of Email configurations.

victoropsConfigs
[]VictorOpsConfig
(Optional)

victoropsConfigs defines the list of VictorOps configurations.

pushoverConfigs
[]PushoverConfig
(Optional)

pushoverConfigs defines the list of Pushover configurations.

snsConfigs
[]SNSConfig
(Optional)

snsConfigs defines the list of SNS configurations

telegramConfigs
[]TelegramConfig
(Optional)

telegramConfigs defines the list of Telegram configurations.

webexConfigs
[]WebexConfig
(Optional)

webexConfigs defines the list of Webex configurations.

msteamsConfigs
[]MSTeamsConfig
(Optional)

msteamsConfigs defines the list of MSTeams configurations. It requires Alertmanager >= 0.26.0.

msteamsv2Configs
[]MSTeamsV2Config
(Optional)

msteamsv2Configs defines the list of MSTeamsV2 configurations. It requires Alertmanager >= 0.28.0.

rocketchatConfigs
[]RocketChatConfig
(Optional)

rocketchatConfigs defines the list of RocketChat configurations. It requires Alertmanager >= 0.28.0.

RocketChatActionConfig

(Appears on:RocketChatConfig)

RocketChatActionConfig defines actions for RocketChat messages.

Field Description
text
string
(Optional)

text defines the button text displayed to users. This is the label that appears on the interactive button.

url
URL
(Optional)

url defines the URL the button links to when clicked. This creates a clickable button that opens the specified URL.

msg
string
(Optional)

msg defines the message to send when the button is clicked. This allows the button to post a predefined message to the channel.

RocketChatConfig

(Appears on:Receiver)

RocketChatConfig configures notifications via RocketChat. It requires Alertmanager >= 0.28.0.

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
URL
(Optional)

apiURL defines the API URL for RocketChat. Defaults to https://open.rocket.chat/ if not specified.

channel
string
(Optional)

channel defines the channel to send alerts to. This can be a channel name (e.g., “#alerts”) or a direct message recipient.

token
Kubernetes core/v1.SecretKeySelector

token defines the sender token for RocketChat authentication. This is the personal access token or bot token used to authenticate API requests.

tokenID
Kubernetes core/v1.SecretKeySelector

tokenID defines the sender token ID for RocketChat authentication. This is the user ID associated with the token used for API requests.

color
string
(Optional)

color defines the message color displayed in RocketChat. This appears as a colored bar alongside the message.

emoji
string
(Optional)

emoji defines the emoji to be displayed as an avatar. If provided, this emoji will be used instead of the default avatar or iconURL.

iconURL
URL
(Optional)

iconURL defines the icon URL for the message avatar. This displays a custom image as the message sender’s avatar.

text
string
(Optional)

text defines the message text to send. This is optional because attachments can be used instead of or alongside text.

title
string
(Optional)

title defines the message title displayed prominently in the message. This appears as bold text at the top of the message attachment.

titleLink
string
(Optional)

titleLink defines the URL that the title will link to when clicked. This makes the message title clickable in the RocketChat interface.

fields
[]RocketChatFieldConfig
(Optional)

fields defines additional fields for the message attachment. These appear as structured key-value pairs within the message.

shortFields
bool
(Optional)

shortFields defines whether to use short fields in the message layout. When true, fields may be displayed side by side to save space.

imageURL
URL
(Optional)

imageURL defines the image URL to display within the message. This embeds an image directly in the message attachment.

thumbURL
URL
(Optional)

thumbURL defines the thumbnail URL for the message. This displays a small thumbnail image alongside the message content.

linkNames
bool
(Optional)

linkNames defines whether to enable automatic linking of usernames and channels. When true, @username and #channel references become clickable links.

actions
[]RocketChatActionConfig
(Optional)

actions defines interactive actions to include in the message. These appear as buttons that users can click to trigger responses.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for RocketChat API requests.

RocketChatFieldConfig

(Appears on:RocketChatConfig)

RocketChatFieldConfig defines a field for RocketChat messages.

Field Description
title
string
(Optional)

title defines the title of this field. This appears as bold text labeling the field content.

value
string
(Optional)

value defines the value of this field, displayed underneath the title. This contains the actual data or content for the field.

short
bool
(Optional)

short defines whether this field should be a short field. When true, the field may be displayed inline with other short fields to save space.

Route

(Appears on:AlertmanagerConfigSpec)

Route defines a node in the routing tree.

Field Description
receiver
string
(Optional)

receiver defines the name of the receiver for this route. If not empty, it should be listed in the receivers field.

groupBy
[]string
(Optional)

groupBy defines the list of labels to group by. Labels must not be repeated (unique list). Special label “…” (aggregate by all possible labels), if provided, must be the only element in the list.

groupWait
string
(Optional)

groupWait defines how long to wait before sending the initial notification. Must match the regular expression^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ Example: “30s”

groupInterval
string
(Optional)

groupInterval defines how long to wait before sending an updated notification. Must match the regular expression^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ Example: “5m”

repeatInterval
string
(Optional)

repeatInterval defines how long to wait before repeating the last notification. Must match the regular expression^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ Example: “4h”

matchers
[]Matcher
(Optional)

matchers defines the list of matchers that the alert’s labels should match. For the first level route, the operator removes any existing equality and regexp matcher on the namespace label and adds a namespace: <object namespace> matcher.

continue
bool
(Optional)

continue defines the boolean indicating whether an alert should continue matching subsequent sibling nodes. It will always be overridden to true for the first-level route by the Prometheus operator.

routes
[]k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON
(Optional)

routes defines the child routes.

muteTimeIntervals
[]string
(Optional)

muteTimeIntervals is a list of MuteTimeInterval names that will mute this route when matched,

activeTimeIntervals
[]string
(Optional)

activeTimeIntervals is a list of TimeInterval names when this route should be active.

SNSConfig

(Appears on:Receiver)

SNSConfig configures notifications via AWS SNS. See https://prometheus.io/docs/alerting/latest/configuration/#sns_configs

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
string
(Optional)

apiURL defines the SNS API URL, e.g. https://sns.us-east-2.amazonaws.com. If not specified, the SNS API URL from the SNS SDK will be used.

sigv4
Sigv4
(Optional)

sigv4 configures AWS’s Signature Verification 4 signing process to sign requests. This includes AWS credentials and region configuration for authentication.

topicARN
string
(Optional)

topicARN defines the SNS topic ARN, e.g. arn:aws:sns:us-east-2:698519295917:My-Topic. If you don’t specify this value, you must specify a value for the PhoneNumber or TargetARN.

subject
string
(Optional)

subject defines the subject line when the message is delivered to email endpoints. This field is only used when sending to email subscribers of an SNS topic.

phoneNumber
string
(Optional)

phoneNumber defines the phone number if message is delivered via SMS in E.164 format. If you don’t specify this value, you must specify a value for the TopicARN or TargetARN.

targetARN
string
(Optional)

targetARN defines the mobile platform endpoint ARN if message is delivered via mobile notifications. If you don’t specify this value, you must specify a value for the TopicARN or PhoneNumber.

message
string
(Optional)

message defines the message content of the SNS notification. This is the actual notification text that will be sent to subscribers.

attributes
map[string]string
(Optional)

attributes defines SNS message attributes as key-value pairs. These provide additional metadata that can be used for message filtering and routing.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for SNS API requests.

SecretKeySelector

(Appears on:EmailConfig, HTTPConfig, OpsGenieConfig, PagerDutyConfig, PushoverConfig, SlackConfig, TelegramConfig, VictorOpsConfig, WeChatConfig, WebhookConfig)

SecretKeySelector selects a key of a Secret.

Field Description
name
string

name defines the name of the secret in the object’s namespace to select from.

key
string

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

SlackAction

(Appears on:SlackConfig)

SlackAction configures a single Slack action that is sent with each notification. See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons for more information.

Field Description
type
string

type defines the type of interactive component. Common values include “button” for clickable buttons and “select” for dropdown menus.

text
string

text defines the user-visible label displayed on the action element. For buttons, this is the button text. For select menus, this is the placeholder text.

url
string
(Optional)

url defines the URL to open when the action is triggered. Only applicable for button-type actions. When set, clicking the button opens this URL.

style
string
(Optional)

style defines the visual appearance of the action element. Valid values include “default”, “primary” (green), and “danger” (red).

name
string
(Optional)

name defines a unique identifier for the action within the message. This value is sent back to your application when the action is triggered.

value
string
(Optional)

value defines the payload sent when the action is triggered. This data is included in the callback sent to your application.

confirm
SlackConfirmationField
(Optional)

confirm defines an optional confirmation dialog that appears before the action is executed. When set, users must confirm their intent before the action proceeds.

SlackConfig

(Appears on:Receiver)

SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
SecretKeySelector
(Optional)

apiURL defines the secret’s key that contains the Slack webhook URL. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

channel
string
(Optional)

channel defines the channel or user to send notifications to.

username
string
(Optional)

username defines the slack bot user name.

color
string
(Optional)

color defines the color of the left border of the Slack message attachment. Can be a hex color code (e.g., “#ff0000”) or a predefined color name.

title
string
(Optional)

title defines the title text displayed in the Slack message attachment.

titleLink
string
(Optional)

titleLink defines the URL that the title will link to when clicked.

pretext
string
(Optional)

pretext defines optional text that appears above the message attachment block.

text
string
(Optional)

text defines the main text content of the Slack message attachment.

fields
[]SlackField
(Optional)

fields defines a list of Slack fields that are sent with each notification.

shortFields
bool
(Optional)

shortFields determines whether fields are displayed in a compact format. When true, fields are shown side by side when possible.

footer
string
(Optional)

footer defines small text displayed at the bottom of the message attachment.

fallback
string
(Optional)

fallback defines a plain-text summary of the attachment for clients that don’t support attachments.

callbackId
string
(Optional)

callbackId defines an identifier for the message used in interactive components.

iconEmoji
string
(Optional)

iconEmoji defines the emoji to use as the bot’s avatar (e.g., “👻”).

iconURL
string
(Optional)

iconURL defines the URL to an image to use as the bot’s avatar.

imageURL
string
(Optional)

imageURL defines the URL to an image file that will be displayed inside the message attachment.

thumbURL
string
(Optional)

thumbURL defines the URL to an image file that will be displayed as a thumbnail on the right side of the message attachment.

linkNames
bool
(Optional)

linkNames enables automatic linking of channel names and usernames in the message. When true, @channel and @username will be converted to clickable links.

mrkdwnIn
[]string
(Optional)

mrkdwnIn defines which fields should be parsed as Slack markdown. Valid values include “pretext”, “text”, and “fields”.

actions
[]SlackAction
(Optional)

actions defines a list of Slack actions that are sent with each notification.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration.

SlackConfirmationField

(Appears on:SlackAction)

SlackConfirmationField protect users from destructive actions or particularly distinguished decisions by asking them to confirm their button click one more time. See https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.

Field Description
text
string

text defines the main message displayed in the confirmation dialog. This should be a clear question or statement asking the user to confirm their action.

title
string
(Optional)

title defines the title text displayed at the top of the confirmation dialog. When not specified, a default title will be used.

okText
string
(Optional)

okText defines the label for the confirmation button in the dialog. When not specified, defaults to “Okay”. This button proceeds with the action.

dismissText
string
(Optional)

dismissText defines the label for the cancel button in the dialog. When not specified, defaults to “Cancel”. This button cancels the action.

SlackField

(Appears on:SlackConfig)

SlackField configures a single Slack field that is sent with each notification. Each field must contain a title, value, and optionally, a boolean value to indicate if the field is short enough to be displayed next to other fields designated as short. See https://api.slack.com/docs/message-attachments#fields for more information.

Field Description
title
string

title defines the label or header text displayed for this field. This appears as bold text above the field value in the Slack message.

value
string

value defines the content or data displayed for this field. This appears below the title and can contain plain text or Slack markdown.

short
bool
(Optional)

short determines whether this field can be displayed alongside other short fields. When true, Slack may display this field side by side with other short fields. When false or not specified, the field takes the full width of the message.

TelegramConfig

(Appears on:Receiver)

TelegramConfig configures notifications via Telegram. See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
string
(Optional)

apiURL defines the Telegram API URL, e.g. https://api.telegram.org. If not specified, the default Telegram API URL will be used.

botToken
SecretKeySelector
(Optional)

botToken defines the Telegram bot token. It is mutually exclusive with botTokenFile. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator. Either botToken or botTokenFile is required.

botTokenFile
string
(Optional)

botTokenFile defines the file to read the Telegram bot token from. It is mutually exclusive with botToken. Either botToken or botTokenFile is required. It requires Alertmanager >= v0.26.0.

chatID
int64

chatID defines the Telegram chat ID where messages will be sent. This can be a user ID, group ID, or channel ID (with @ prefix for public channels).

messageThreadID
int64
(Optional)

messageThreadID defines the Telegram Group Topic ID for threaded messages. This allows sending messages to specific topics within Telegram groups. It requires Alertmanager >= 0.26.0.

message
string
(Optional)

message defines the message template for the Telegram notification. This is the content that will be sent to the specified chat.

disableNotifications
bool
(Optional)

disableNotifications controls whether Telegram notifications are sent silently. When true, users will receive the message without notification sounds.

parseMode
string
(Optional)

parseMode defines the parse mode for telegram message formatting. Valid values are “MarkdownV2”, “Markdown”, and “HTML”. This determines how text formatting is interpreted in the message.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for Telegram API requests.

Time (string alias)

(Appears on:TimeRange)

Time defines a time in 24hr format

TimeInterval

(Appears on:AlertmanagerConfigSpec)

TimeInterval specifies the periods in time when notifications will be muted or active.

Field Description
name
string

name of the time interval.

timeIntervals
[]TimePeriod
(Optional)

timeIntervals defines a list of TimePeriod.

TimePeriod

(Appears on:TimeInterval)

TimePeriod describes periods of time.

Field Description
times
[]TimeRange
(Optional)

times defines a list of TimeRange

weekdays
[]WeekdayRange
(Optional)

weekdays defines a list of WeekdayRange

daysOfMonth
[]DayOfMonthRange
(Optional)

daysOfMonth defines a list of DayOfMonthRange

months
[]MonthRange
(Optional)

months defines a list of MonthRange

years
[]YearRange
(Optional)

years defines a list of YearRange

TimeRange

(Appears on:TimePeriod)

TimeRange defines a start and end time in 24hr format

Field Description
startTime
Time
(Optional)

startTime defines the start time in 24hr format.

endTime
Time
(Optional)

endTime defines the end time in 24hr format.

URL (string alias)

(Appears on:DiscordConfig, RocketChatActionConfig, RocketChatConfig, WebexConfig)

URL represents a valid URL

VictorOpsConfig

(Appears on:Receiver)

VictorOpsConfig configures notifications via VictorOps. See https://prometheus.io/docs/alerting/latest/configuration/#victorops_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiKey
SecretKeySelector
(Optional)

apiKey defines the secret’s key that contains the API key to use when talking to the VictorOps API. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

apiUrl
string
(Optional)

apiUrl defines the VictorOps API URL. When not specified, defaults to the standard VictorOps API endpoint.

routingKey
string
(Optional)

routingKey defines a key used to map the alert to a team. This determines which VictorOps team will receive the alert notification.

messageType
string
(Optional)

messageType describes the behavior of the alert. Valid values are “CRITICAL”, “WARNING”, and “INFO”.

entityDisplayName
string
(Optional)

entityDisplayName contains a summary of the alerted problem. This appears as the main title or identifier for the incident.

stateMessage
string
(Optional)

stateMessage contains a long explanation of the alerted problem. This provides detailed context about the incident.

monitoringTool
string
(Optional)

monitoringTool defines the monitoring tool the state message is from. This helps identify the source system that generated the alert.

customFields
[]KeyValue
(Optional)

customFields defines additional custom fields for notification. These provide extra metadata that will be included with the VictorOps incident.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client’s configuration for VictorOps API requests.

WeChatConfig

(Appears on:Receiver)

WeChatConfig configures notifications via WeChat. See https://prometheus.io/docs/alerting/latest/configuration/#wechat_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiSecret
SecretKeySelector
(Optional)

apiSecret defines the secret’s key that contains the WeChat API key. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

apiURL
string
(Optional)

apiURL defines the WeChat API URL. When not specified, defaults to the standard WeChat Work API endpoint.

corpID
string
(Optional)

corpID defines the corp id for authentication. This is the unique identifier for your WeChat Work organization.

agentID
string
(Optional)

agentID defines the application agent ID within WeChat Work. This identifies which WeChat Work application will send the notifications.

toUser
string
(Optional)

toUser defines the target user(s) to receive the notification. Can be a single user ID or multiple user IDs separated by ‘|’.

toParty
string
(Optional)

toParty defines the target department(s) to receive the notification. Can be a single department ID or multiple department IDs separated by ‘|’.

toTag
string
(Optional)

toTag defines the target tag(s) to receive the notification. Can be a single tag ID or multiple tag IDs separated by ‘|’.

message
string
(Optional)

message defines the API request data as defined by the WeChat API. This contains the actual notification content to be sent.

messageType
string
(Optional)

messageType defines the type of message to send. Valid values include “text”, “markdown”, and other WeChat Work supported message types.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for WeChat API requests.

WebexConfig

(Appears on:Receiver)

WebexConfig configures notification via Cisco Webex See https://prometheus.io/docs/alerting/latest/configuration/#webex_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

apiURL
URL
(Optional)

apiURL defines the Webex Teams API URL i.e. https://webexapis.com/v1/messages

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client’s configuration. You must use this configuration to supply the bot token as part of the HTTP Authorization header.

message
string
(Optional)

message defines the message template

roomID
string

roomID defines the ID of the Webex Teams room where to send the messages.

WebhookConfig

(Appears on:Receiver)

WebhookConfig configures notifications via a generic receiver supporting the webhook payload. See https://prometheus.io/docs/alerting/latest/configuration/#webhook_config

Field Description
sendResolved
bool
(Optional)

sendResolved defines whether or not to notify about resolved alerts.

url
string
(Optional)

url defines the URL to send HTTP POST requests to. urlSecret takes precedence over url. One of urlSecret and url should be defined.

urlSecret
SecretKeySelector
(Optional)

urlSecret defines the secret’s key that contains the webhook URL to send HTTP requests to. urlSecret takes precedence over url. One of urlSecret and url should be defined. The secret needs to be in the same namespace as the AlertmanagerConfig object and accessible by the Prometheus Operator.

httpConfig
HTTPConfig
(Optional)

httpConfig defines the HTTP client configuration for webhook requests.

maxAlerts
int32
(Optional)

maxAlerts defines the maximum number of alerts to be sent per webhook message. When 0, all alerts are included in the webhook payload.

timeout
Duration
(Optional)

timeout defines the maximum time to wait for a webhook request to complete, before failing the request and allowing it to be retried. It requires Alertmanager >= v0.28.0.

Weekday (string alias)

Weekday is day of the week

Value Description

"friday"

"monday"

"saturday"

"sunday"

"thursday"

"tuesday"

"wednesday"

WeekdayRange (string alias)

(Appears on:TimePeriod)

WeekdayRange is an inclusive range of days of the week beginning on Sunday Days can be specified by name (e.g ‘Sunday’) or as an inclusive range (e.g ‘Monday:Friday’)

YearRange (string alias)

(Appears on:TimePeriod)

YearRange is an inclusive range of years