Logs

Logs runs a Loki-compatible log database on object storage: a writer StatefulSet and, in Sharded mode, a reader group per storage shard.

API version
telemetry.plural.sh/v1alpha1
Kind
Logs
Scope
Namespaced

Logs

  • apiVersionstring

    telemetry.plural.sh/v1alpha1

  • kindstring

    Logs

  • metadataObjectMeta

    Standard object metadata. See the Kubernetes API reference for its fields.

LogsSpec

Used by Logs

LogsSpec defines the desired state of Logs.

  • reader replicas must be zero in Standalone modeself.mode != 'Standalone' || !has(self.reader) || !has(self.reader.replicas) || self.reader.replicas == 0
  • writer replicas must be one in Standalone modeself.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
  • modeLogsModedefault Standalone
    Enum: [Standalone Sharded]
  • versionstring

    Version is the canonical Logs 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-]+)*)?$
  • imageImageSpecdefault { pullPolicy:IfNotPresent repository:ghcr.io/pluralsh/logs }
  • serviceServiceSpecdefault { grpcPort:9091 httpPort:3100 type:ClusterIP }
  • serviceAccountServiceAccountSpec

ImageSpec

Used by LogsSpec

  • repositorystring

    Repository is the container image repository. It defaults to the product's official GHCR repository.

  • tagstring

    Tag 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-]+)*)?$
  • pullPolicyPullPolicydefault IfNotPresent

    PullPolicy is the Kubernetes image pull policy.

    Enum: [Always IfNotPresent Never]

LogsConfigSpec

Used by LogsSpec

  • set retention or the deprecated retentionSeconds, not both!has(self.retention) || !has(self.retentionSeconds)
  • storageStorageSpecdefault { path:logs }
  • segmentDurationSecondsintegerdefault 3600
    Minimum: 1
  • retentionstring

    Retention is how long data is kept, counted from ingestion, e.g. 14d or 2w. When unset, the server default of 14 days applies.

    Pattern: ^([0-9]+[wdhms])*0*[1-9][0-9]*[wdhms]([0-9]+[wdhms])*$
  • retentionSecondsinteger

    RetentionSeconds is deprecated in favor of retention.

    Minimum: 1
  • shardingShardingSpec
  • elasticsearchLogsElasticsearchSpecdefault { }
  • cacheWarmerCacheWarmerSpec
  • fullTextIndexbooleandefault false

    FullTextIndex builds a BM25 index of log lines at write time. It speeds up |= line filters on rare terms and enables ranked | match queries, but costs writers roughly a dozen storage records per entry. When off, the default, line filters scan like Loki.

  • namespacesstring arraydefault [default]

WorkloadSpec

Used by LogsSpec

  • replicasinteger

    Replicas defaults to one for sharded writers and two for sharded readers. Standalone mode uses exactly one writer and no reader.

    Minimum: 0
  • nodeSelectorobject (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 array

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

  • Resources 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.

  • podTemplatePodTemplateSpec

    PodTemplate is the full Kubernetes pod template escape hatch. Operator required fields and the first-class scheduling fields are merged into it.

  • dataVolumeVolumeSpec
  • cacheVolumeVolumeSpec
  • persistentVolumeClaimRetentionPolicyPersistentVolumeClaimRetentionPolicySpec

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

  • readGroupsReadGroupsSpec

    ReadGroups configures per-shard reader groups. Readers only; ignored for writers and in standalone mode.

  • autoscalingAutoscalingSpec

    Autoscaling adds a HorizontalPodAutoscaler per reader StatefulSet, one per reader group. Readers only; ignored for writers and in standalone mode.

ServiceSpec

Used by LogsSpec

  • httpPortinteger
  • grpcPortinteger
  • typeServiceTypedefault ClusterIP
    Enum: [ClusterIP NodePort LoadBalancer]
  • annotationsobject (keys:string, values:string)

IngressSpec

Used by LogsSpec

  • 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('/'))
  • enabledboolean
  • hostnamestring
  • ingressClassstring
  • pathPrefixstring
  • Standard object metadata. See the Kubernetes API reference for its fields.

ServiceAccountSpec

Used by LogsSpec

  • annotationsobject (keys:string, values:string)

StorageSpec

Used by LogsConfigSpec

  • pathstring
  • settingsPathstring
  • objectStoreObjectStoreSpec
  • blockCacheCacheSpec
  • metaCacheCacheSpec
  • Disk 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.

LogsPageSpec

Used by LogsConfigSpec

  • targetSizeBytesintegerdefault 1048576
    Minimum: 1
  • maxRowsintegerdefault 8192
    Minimum: 1
  • rowsPerBlockintegerdefault 256
    Minimum: 1

WriteSpec

Used by LogsConfigSpec

  • durabilityDurabilitydefault applied
    Enum: [applied written durable]
  • flushIntervalSecondsintegerdefault 10
    Minimum: 0
  • bufferQueueCapacityintegerdefault 10000
    Minimum: 1
  • bufferFlushIntervalMillisecondsintegerdefault 30000
    Minimum: 1
  • bufferSizeThresholdBytesintegerdefault 67108864
    Minimum: 1
  • remoteConcurrencyintegerdefault 16
    Minimum: 1
  • remoteRetriesintegerdefault 2
    Minimum: 0

ShardingSpec

Used by LogsConfigSpec

  • renewIntervalSeconds must be less than leaseDurationSeconds!has(self.renewIntervalSeconds) || !has(self.leaseDurationSeconds) || self.renewIntervalSeconds < self.leaseDurationSeconds
  • ioConcurrencyLimitinteger

    IOConcurrencyLimit 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: 1
  • leaseDurationSecondsintegerdefault 15
    Minimum: 1
  • renewIntervalSecondsintegerdefault 5
    Minimum: 1

LogsRequestSpec

Used by LogsConfigSpec

  • maxDecodedRequestBytes must be at least maxRequestBytes!has(self.maxRequestBytes) || !has(self.maxDecodedRequestBytes) || self.maxDecodedRequestBytes >= self.maxRequestBytes
  • maxRequestBytesintegerdefault 33554432

    MaxRequestBytes caps a request body as received, before content decoding.

    Minimum: 1
  • maxDecodedRequestBytesintegerdefault 134217728

    MaxDecodedRequestBytes caps a write body after gzip or snappy decoding. Must be at least maxRequestBytes.

    Minimum: 1
  • maxQueryEntriesintegerdefault 5000
    Minimum: 1
  • maxQueryPagesintegerdefault 10000
    Minimum: 1
  • maxStructuredMetadataFieldsintegerdefault 128
    Minimum: 1
  • queryConcurrencyintegerdefault 16
    Minimum: 1
  • maxInFlightQueryBytesinteger

    MaxInFlightQueryBytes bounds the decoded bytes all running queries hold at once. When omitted, the operator sizes it from the memory limit.

    Minimum: 1

LogsElasticsearchSpec

Used by LogsConfigSpec

LogsElasticsearchSpec maps Elasticsearch _bulk documents to log entries.

  • messageFieldsstring arraydefault [message log msg]

    MessageFields are tried in order; the first present becomes the log line.

    items:MinLength: 1
  • timeFieldstringdefault @timestamp

    TimeField holds the entry timestamp as RFC3339 or epoch milliseconds.

    MinLength: 1
  • streamFieldsstring array

    StreamFields are document fields promoted to stream labels. Keep them low-cardinality; all other fields become structured metadata.

    items:MinLength: 1

CacheWarmerSpec

Used by LogsConfigSpec

  • enabledboolean

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

  • warmRangeSecondsinteger

    WarmRangeSeconds 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: 1
  • payloadWarmRangeSecondsinteger

    PayloadWarmRangeSeconds 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: 1
  • timeoutSecondsintegerdefault 30
    Minimum: 1
  • concurrencyintegerdefault 2
    Minimum: 1
  • includePayloadsbooleandefault false
  • blockReadinessboolean

    BlockReadiness holds readiness until the startup pass ends. Unset keeps the server default, false.

  • metadataBudgetPercentinteger

    MetadataBudgetPercent is the share of the metadata cache warming may fill before it stops; the server default is 75.

    Maximum: 100Minimum: 0
  • payloadBudgetPercentinteger

    PayloadBudgetPercent 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: 0
  • Continuous warms SSTs that appear in reader manifests after startup.

AuthSpec

Used by LogsConfigSpec

VolumeSpec

Used by WorkloadSpec

  • exactly one of emptyDir or persistentVolumeClaim is requiredhas(self.emptyDir) != has(self.persistentVolumeClaim)

PersistentVolumeClaimRetentionPolicySpec

Used by WorkloadSpec

  • WhenDeleted controls PVC retention when the StatefulSet is deleted. When omitted, the object-store-dependent workload default is used.

    Enum: [Retain Delete]
  • WhenScaled 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.

  • enabledbooleandefault true

    Enabled defaults to true. When false, every reader opens every shard.

  • hedgeAfterMillisecondsintegerdefault 250

    HedgeAfterMilliseconds 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: 0
  • requestTimeoutSecondsintegerdefault 120

    RequestTimeoutSeconds 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
  • enabledboolean
  • minReplicasinteger

    MinReplicas defaults to the workload's replicas, or 2.

    Minimum: 1
  • maxReplicasinteger
    Minimum: 1
  • targetCPUUtilizationPercentageinteger

    TargetCPUUtilizationPercentage is average CPU usage relative to the container's CPU request. Defaults to 70 when no memory target is set.

    Minimum: 1
  • targetMemoryUtilizationPercentageinteger

    TargetMemoryUtilizationPercentage is average memory usage relative to the container's memory request.

    Minimum: 1
  • Behavior is passed through to the HorizontalPodAutoscaler.

IngressMetadataSpec

Used by IngressSpec

  • annotationsobject (keys:string, values:string)
  • labelsobject (keys:string, values:string)

IngressTLSSpec

Used by IngressSpec

  • enabledboolean
  • secretNamestring

ObjectStoreSpec

Used by StorageSpec

  • Aws object stores require aws configurationself.type != 'Aws' || has(self.aws)
  • aws configuration is only valid for Aws object storesself.type == 'Aws' || !has(self.aws)
  • Azure object stores require azure configurationself.type != 'Azure' || has(self.azure)
  • azure configuration is only valid for Azure object storesself.type == 'Azure' || !has(self.azure)
  • Gcp object stores require gcp configurationself.type != 'Gcp' || has(self.gcp)
  • gcp configuration is only valid for Gcp object storesself.type == 'Gcp' || !has(self.gcp)

CacheSpec

Used by StorageSpec

  • Enum: [FoyerHybrid FoyerMemory]
  • memoryCapacityinteger
  • diskCapacityinteger
  • diskPathstring
  • capacityinteger
  • shardsinteger
  • writePolicystring
  • flushersinteger
  • bufferPoolSizeinteger
  • submitQueueSizeThresholdinteger

DiskSpec

Used by StorageSpec

DiskSpec is a disk's provisioned performance, as its provider advertises it.

  • throughputMiBpsintegerdefault 125
    Minimum: 1
  • iopsintegerdefault 3000
    Minimum: 1

Durability

Used by WriteSpec

Underlying type string

  • applied
  • written
  • durable

ContinuousCacheWarmerSpec

Used by CacheWarmerSpec

  • enabledbooleandefault true
  • intervalSecondsintegerdefault 10
    Minimum: 1
  • warmRangeSecondsinteger

    WarmRangeSeconds is CacheWarmerSpec.WarmRangeSeconds for new SSTs.

    Minimum: 1
  • payloadWarmRangeSecondsinteger

    PayloadWarmRangeSeconds is CacheWarmerSpec.PayloadWarmRangeSeconds for new SSTs.

    Minimum: 1
  • includePayloadsbooleandefault true

AccessSpec

JWTSpec

Used by AuthSpec

  • issuerstring
  • audiencestring
  • refreshIntervalSecondsintegerdefault 300
    Minimum: 1
  • requestTimeoutSecondsintegerdefault 5
    Minimum: 1

PersistentVolumeClaimRetentionPolicyType

Used by PersistentVolumeClaimRetentionPolicySpec

Underlying type string

  • Retain
  • Delete

ObjectStoreType

Used by ObjectStoreSpec

Underlying type string

  • InMemory
  • Local
  • Aws
  • Azure
  • Gcp

AWSObjectStoreSpec

Used by ObjectStoreSpec

AWSObjectStoreSpec configures an Amazon S3 or S3-compatible object store.

  • accessKeyIDSecretRef and secretAccessKeySecretRef must be configured togetherhas(self.accessKeyIDSecretRef) == has(self.secretAccessKeySecretRef)

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

GCPObjectStoreSpec

Used by ObjectStoreSpec

  • serviceAccountKeySecretRef and bearerTokenSecretRef are mutually exclusive![has(self.serviceAccountKeySecretRef), has(self.bearerTokenSecretRef)].all(x, x)

CacheType

Used by CacheSpec

Underlying type string

  • FoyerHybrid
  • FoyerMemory

BasicCredentialSpec

Used by AccessSpec

JWKSSpec

Used by JWTSpec

  • exactly one of url or secretKeyRef is required(has(self.url) && self.url.size() > 0) != has(self.secretKeyRef)

AzureClientSecretAuthSpec

Used by AzureObjectStoreSpec

  • clientIDstring
    MinLength: 1
  • tenantIDstring
    MinLength: 1
  • clientSecretKeyRefSecretKeySelector

AzureWorkloadIdentityAuthSpec

Used by AzureObjectStoreSpec

  • clientIDstring
    MinLength: 1
  • tenantIDstring
    MinLength: 1
  • tokenFilestring
    MinLength: 1