Metrics
Metrics runs a Prometheus-compatible metrics database on object storage: a writer StatefulSet and, in Sharded mode, a reader group per storage shard.
- API version
- telemetry.plural.sh/v1alpha1
- Kind
- Metrics
- Scope
- Namespaced
Metrics
apiVersionstringtelemetry.plural.sh/v1alpha1kindstringMetricsmetadataObjectMetaStandard object metadata. See the Kubernetes API reference for its fields.
specMetricsSpec
MetricsSpec
Used by Metrics
MetricsSpec defines the desired state of Metrics.
- reader replicas must be zero in Standalone mode
self.mode != 'Standalone' || !has(self.reader) || !has(self.reader.replicas) || self.reader.replicas == 0 - writer replicas must be one in Standalone mode
self.mode != 'Standalone' || !has(self.writer) || !has(self.writer.replicas) || self.writer.replicas == 1 - spec.version and deprecated spec.image.tag must match when both are set
!has(self.version) || !has(self.image) || !has(self.image.tag) || self.version == self.image.tag
- Enum: [Standalone Sharded]
versionstringVersion is the canonical Metrics container image tag. It must be SemVer without a leading "v". When omitted, deprecated image.tag is used, then the operator's default version.
Pattern:^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*)|([0-9]*[A-Za-z-][0-9A-Za-z-]*))(\.((0|[1-9][0-9]*)|([0-9]*[A-Za-z-][0-9A-Za-z-]*)))*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$configMetricsConfigSpecwriterWorkloadSpecreaderWorkloadSpecingressIngressSpecserviceAccountServiceAccountSpec
ImageSpec
Used by MetricsSpec
repositorystringRepository is the container image repository. It defaults to the product's official GHCR repository.
tagstringTag is a deprecated alias for the enclosing resource's spec.version. When both are set they must match, and spec.version takes precedence. Deprecated: use spec.version.
Pattern:^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*)|([0-9]*[A-Za-z-][0-9A-Za-z-]*))(\.((0|[1-9][0-9]*)|([0-9]*[A-Za-z-][0-9A-Za-z-]*)))*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$PullPolicy is the Kubernetes image pull policy.
Enum: [Always IfNotPresent Never]
MetricsConfigSpec
Used by MetricsSpec
retentionstringRetention is how long samples are kept, counted from their timestamp, e.g. 14d or 2w. When unset, the server default of 60 days applies.
Pattern:^([0-9]+[wdhms])*0*[1-9][0-9]*[wdhms]([0-9]+[wdhms])*$readerCacheCapacityintegerReaderCacheCapacity sizes each shard's query cache: half of it, in bytes, holds decoded series chunks. When omitted, the operator sizes it from the container memory limit.
Minimum: 1forwardIndexCacheCapacityBytesintegerForwardIndexCacheCapacityBytes bounds forward-index entries and resolved selectors. When omitted, the operator sizes it from the container memory limit.
Minimum: 1queryMetricsQuerySpecQuery limits PromQL evaluation across the whole process.
cacheWarmerCacheWarmerSpecwriteWriteSpecrequestMetricsRequestSpecshardingShardingSpecauthAuthSpecnamespacesstring arraydefault[default]
WorkloadSpec
Used by MetricsSpec
replicasintegerReplicas defaults to one for sharded writers and two for sharded readers. Standalone mode uses exactly one writer and no reader.
Minimum: 0nodeSelectorobject (keys:string, values:string)NodeSelector is merged with podTemplate.spec.nodeSelector. Values here take precedence when the same key is configured in both places.
tolerationsToleration arrayTolerations are merged with podTemplate.spec.tolerations. A first-class toleration replaces a podTemplate toleration with the same key, operator, and effect; otherwise it is appended.
resourcesResourceRequirementsResources configures requests and limits for the datastore container. Values here take precedence over podTemplate container resources. Missing values default to a 250m CPU request and a 2Gi memory limit (8Gi for Metrics, Logs and Traces writers and standalone servers, which roll up closed days), with memory requested at its limit unless a request is set. Those writers need at least a 6Gi limit and are not rolled out with less. The operator holds back a quarter of the memory limit (at least 768Mi, at most half) as headroom and sizes the caches and query memory budgets from the rest.
podTemplatePodTemplateSpecPodTemplate is the full Kubernetes pod template escape hatch. Operator required fields and the first-class scheduling fields are merged into it.
dataVolumeVolumeSpeccacheVolumeVolumeSpecpersistentVolumeClaimRetentionPolicyPersistentVolumeClaimRetentionPolicySpecPersistentVolumeClaimRetentionPolicy controls whether StatefulSet PVCs are retained or deleted when the workload is deleted or scaled down. When omitted, remote and in-memory object stores default to Delete while Local object stores default to Retain because the data PVC is authoritative.
readGroupsReadGroupsSpecReadGroups configures per-shard reader groups. Readers only; ignored for writers and in standalone mode.
autoscalingAutoscalingSpecAutoscaling adds a HorizontalPodAutoscaler per reader StatefulSet, one per reader group. Readers only; ignored for writers and in standalone mode.
ServiceSpec
Used by MetricsSpec
httpPortintegergrpcPortinteger- Enum: [ClusterIP NodePort LoadBalancer]
annotationsobject (keys:string, values:string)
IngressSpec
Used by MetricsSpec
- hostname is required when ingress is enabled
!has(self.enabled) || !self.enabled || (has(self.hostname) && self.hostname.size() > 0) - pathPrefix must be empty or start with '/' and must not end with '/'
!has(self.pathPrefix) || self.pathPrefix.size() == 0 || (self.pathPrefix.size() > 1 && self.pathPrefix.startsWith('/') && !self.pathPrefix.endsWith('/'))
enabledbooleanhostnamestringingressClassstringpathPrefixstringmetadataIngressMetadataSpecStandard object metadata. See the Kubernetes API reference for its fields.
ServiceAccountSpec
Used by MetricsSpec
annotationsobject (keys:string, values:string)
StorageSpec
Used by MetricsConfigSpec
pathstringsettingsPathstringobjectStoreObjectStoreSpecblockCacheCacheSpecmetaCacheCacheSpecdiskDiskSpecDisk describes the performance specs of the disks used for block and meta caches. This is used to optimize caches and defaults to common block store specs as a reasonable baseline.
MetricsQuerySpec
Used by MetricsConfigSpec
MetricsQuerySpec limits the queries one Metrics process evaluates at once.
maxConcurrentintegerMaxConcurrent is how many queries evaluate at once; the rest wait. Defaults to 32.
Minimum: 1queueTimeoutSecondsintegerQueueTimeoutSeconds is how long a query waits to start before failing with 503. Defaults to 30.
Minimum: 1maxMemoryBytesintegerMaxMemoryBytes is the engine memory one query may reserve. Defaults to half the memory budget, capped at 1 GiB, so one query cannot take all of it.
Minimum: 1memoryBudgetBytesintegerMemoryBudgetBytes is the engine memory all running queries together may reserve. When omitted, the operator sizes it from the container memory limit.
Minimum: 1maxConcurrentShardReadsintegerMaxConcurrentShardReads is how many shard reads a reader serves to other reader groups at once. Defaults to 16.
Minimum: 1
CacheWarmerSpec
Used by MetricsConfigSpec
enabledbooleanEnabled runs a startup pass over recent SSTs. Defaults to true for readers, which warm filters and indexes in the background; Logs readers that skip filters warm only indexes.
warmRangeSecondsintegerWarmRangeSeconds is the recent window whose metadata the startup pass warms. Unset covers all live data, which retention bounds, and the metadata budget bounds what is held. A set value bounds payloads too unless PayloadWarmRangeSeconds is set. 7200, the default of earlier CRDs that the API server stored in existing resources, is read as unset.
Minimum: 1payloadWarmRangeSecondsintegerPayloadWarmRangeSeconds is the recent window whose payloads the startup pass warms when IncludePayloads is set. Unset uses WarmRangeSeconds when that is set, otherwise all live data, which PayloadBudgetPercent bounds newest first. Servers older than this field reject it, so set it only once every reader runs a server that knows it.
Minimum: 1timeoutSecondsintegerdefault30Minimum: 1concurrencyintegerdefault2Minimum: 1includePayloadsbooleandefaultfalseblockReadinessbooleanBlockReadiness holds readiness until the startup pass ends. Unset keeps the server default, false.
metadataBudgetPercentintegerMetadataBudgetPercent is the share of the metadata cache warming may fill before it stops; the server default is 75.
Maximum: 100Minimum: 0payloadBudgetPercentintegerPayloadBudgetPercent is the share of the data block cache that payload warming may fill, newest first: of its disk tier when it has one, otherwise of its memory. Warmed payloads go to the disk tier only, so warming never fills memory. The server default is 90 with a disk tier and 50 without. Servers older than this field reject it, so set it only once every reader runs a server that knows it.
Maximum: 100Minimum: 0continuousContinuousCacheWarmerSpecContinuous warms SSTs that appear in reader manifests after startup.
WriteSpec
Used by MetricsConfigSpec
- Enum: [applied written durable]
flushIntervalSecondsintegerdefault10Minimum: 0bufferQueueCapacityintegerdefault10000Minimum: 1bufferFlushIntervalMillisecondsintegerdefault30000Minimum: 1bufferSizeThresholdBytesintegerdefault67108864Minimum: 1remoteConcurrencyintegerdefault16Minimum: 1remoteRetriesintegerdefault2Minimum: 0
MetricsRequestSpec
Used by MetricsConfigSpec
- maxDecodedRequestBytes must be at least maxRequestBytes
!has(self.maxRequestBytes) || !has(self.maxDecodedRequestBytes) || self.maxDecodedRequestBytes >= self.maxRequestBytes
maxRequestBytesintegerdefault33554432MaxRequestBytes caps a request body as received, before content decoding.
Minimum: 1maxDecodedRequestBytesintegerdefault134217728MaxDecodedRequestBytes caps a write body after gzip or snappy decoding. Must be at least maxRequestBytes.
Minimum: 1
ShardingSpec
Used by MetricsConfigSpec
- renewIntervalSeconds must be less than leaseDurationSeconds
!has(self.renewIntervalSeconds) || !has(self.leaseDurationSeconds) || self.renewIntervalSeconds < self.leaseDurationSeconds
ioConcurrencyLimitintegerIOConcurrencyLimit bounds concurrent storage I/O operations per pod. When omitted, the operator infers it from the component's memory request at 96 permits per GiB, with a minimum of 128.
Minimum: 1leaseDurationSecondsintegerdefault15Minimum: 1renewIntervalSecondsintegerdefault5Minimum: 1
AuthSpec
Used by MetricsConfigSpec
unauthenticatedbooleandefaultfalseUnauthenticated permits anonymous access to namespace HTTP APIs.
globalAccessSpecjwtJWTSpecinternalTokenSecretRefSecretKeySelector
VolumeSpec
Used by WorkloadSpec
- exactly one of emptyDir or persistentVolumeClaim is required
has(self.emptyDir) != has(self.persistentVolumeClaim)
emptyDirEmptyDirVolumeSourcepersistentVolumeClaimPersistentVolumeClaimSpec
PersistentVolumeClaimRetentionPolicySpec
Used by WorkloadSpec
whenDeletedPersistentVolumeClaimRetentionPolicyTypeWhenDeleted controls PVC retention when the StatefulSet is deleted. When omitted, the object-store-dependent workload default is used.
Enum: [Retain Delete]whenScaledPersistentVolumeClaimRetentionPolicyTypeWhenScaled controls PVC retention when StatefulSet replicas are reduced. When omitted, the object-store-dependent workload default is used.
Enum: [Retain Delete]
ReadGroupsSpec
Used by WorkloadSpec
ReadGroupsSpec splits sharded readers into one group per storage shard. Each group is a StatefulSet that opens only its own shard; a query sent to any reader reads its own shard in process and every other shard from that shard's group over gRPC. Replicas, resources, and autoscaling apply to each group.
enabledbooleandefaulttrueEnabled defaults to true. When false, every reader opens every shard.
hedgeAfterMillisecondsintegerdefault250HedgeAfterMilliseconds starts a second copy of a unary shard read on another replica of its group when the first has not answered in time. Streaming reads are never hedged. Zero disables hedging.
Minimum: 0requestTimeoutSecondsintegerdefault120RequestTimeoutSeconds bounds one shard read.
Minimum: 1
AutoscalingSpec
Used by WorkloadSpec
AutoscalingSpec scales reader replicas on resource utilization. While enabled the HorizontalPodAutoscaler owns replica counts and the workload's replicas field only seeds a new StatefulSet.
- minReplicas must not exceed maxReplicas
!has(self.minReplicas) || self.minReplicas <= self.maxReplicas
enabledbooleanminReplicasintegerMinReplicas defaults to the workload's replicas, or 2.
Minimum: 1maxReplicasintegerMinimum: 1targetCPUUtilizationPercentageintegerTargetCPUUtilizationPercentage is average CPU usage relative to the container's CPU request. Defaults to 70 when no memory target is set.
Minimum: 1targetMemoryUtilizationPercentageintegerTargetMemoryUtilizationPercentage is average memory usage relative to the container's memory request.
Minimum: 1behaviorHorizontalPodAutoscalerBehaviorBehavior is passed through to the HorizontalPodAutoscaler.
IngressMetadataSpec
Used by IngressSpec
annotationsobject (keys:string, values:string)labelsobject (keys:string, values:string)
IngressTLSSpec
Used by IngressSpec
enabledbooleansecretNamestring
ObjectStoreSpec
Used by StorageSpec
- Aws object stores require aws configuration
self.type != 'Aws' || has(self.aws) - aws configuration is only valid for Aws object stores
self.type == 'Aws' || !has(self.aws) - Azure object stores require azure configuration
self.type != 'Azure' || has(self.azure) - azure configuration is only valid for Azure object stores
self.type == 'Azure' || !has(self.azure) - Gcp object stores require gcp configuration
self.type != 'Gcp' || has(self.gcp) - gcp configuration is only valid for Gcp object stores
self.type == 'Gcp' || !has(self.gcp)
- Enum: [InMemory Local Aws Azure Gcp]
pathstringazureAzureObjectStoreSpec
CacheSpec
Used by StorageSpec
typeCacheTypeEnum: [FoyerHybrid FoyerMemory]memoryCapacityintegerdiskCapacityintegerdiskPathstringcapacityintegershardsintegerwritePolicystringflushersintegerbufferPoolSizeintegersubmitQueueSizeThresholdinteger
DiskSpec
Used by StorageSpec
DiskSpec is a disk's provisioned performance, as its provider advertises it.
throughputMiBpsintegerdefault125Minimum: 1iopsintegerdefault3000Minimum: 1
ContinuousCacheWarmerSpec
Used by CacheWarmerSpec
enabledbooleandefaulttrueintervalSecondsintegerdefault10Minimum: 1warmRangeSecondsintegerWarmRangeSeconds is CacheWarmerSpec.WarmRangeSeconds for new SSTs.
Minimum: 1payloadWarmRangeSecondsintegerPayloadWarmRangeSeconds is CacheWarmerSpec.PayloadWarmRangeSeconds for new SSTs.
Minimum: 1includePayloadsbooleandefaulttrue
Durability
AccessSpec
Used by AuthSpec
readBasicCredentialSpec arraywriteBasicCredentialSpec array
JWTSpec
PersistentVolumeClaimRetentionPolicyType
ObjectStoreType
AWSObjectStoreSpec
Used by ObjectStoreSpec
AWSObjectStoreSpec configures an Amazon S3 or S3-compatible object store.
- accessKeyIDSecretRef and secretAccessKeySecretRef must be configured together
has(self.accessKeyIDSecretRef) == has(self.secretAccessKeySecretRef)
regionstringMinLength: 1bucketstringMinLength: 1endpointstringallowHTTPbooleanvirtualHostedStylebooleanaccessKeyIDSecretRefSecretKeySelectorsecretAccessKeySecretRefSecretKeySelectorsessionTokenSecretRefSecretKeySelector
AzureObjectStoreSpec
Used by ObjectStoreSpec
- at most one Azure authentication method may be configured
[has(self.accessKeySecretRef), has(self.sasTokenSecretRef), has(self.bearerTokenSecretRef), has(self.clientSecret), has(self.workloadIdentity)].filter(x, x).size() <= 1
accountstringMinLength: 1containerstringMinLength: 1endpointstringallowHTTPbooleanaccessKeySecretRefSecretKeySelectorsasTokenSecretRefSecretKeySelectorbearerTokenSecretRefSecretKeySelectorclientSecretAzureClientSecretAuthSpecworkloadIdentityAzureWorkloadIdentityAuthSpec
GCPObjectStoreSpec
Used by ObjectStoreSpec
- serviceAccountKeySecretRef and bearerTokenSecretRef are mutually exclusive
![has(self.serviceAccountKeySecretRef), has(self.bearerTokenSecretRef)].all(x, x)
bucketstringMinLength: 1baseURLstringserviceAccountKeySecretRefSecretKeySelectorbearerTokenSecretRefSecretKeySelector
CacheType
BasicCredentialSpec
Used by AccessSpec
usernamestringMinLength: 1passwordSecretKeyRefSecretKeySelector
JWKSSpec
Used by JWTSpec
- exactly one of url or secretKeyRef is required
(has(self.url) && self.url.size() > 0) != has(self.secretKeyRef)
urlstringsecretKeyRefSecretKeySelector
AzureClientSecretAuthSpec
Used by AzureObjectStoreSpec
clientIDstringMinLength: 1tenantIDstringMinLength: 1clientSecretKeyRefSecretKeySelector
AzureWorkloadIdentityAuthSpec
Used by AzureObjectStoreSpec
clientIDstringMinLength: 1tenantIDstringMinLength: 1tokenFilestringMinLength: 1