153 lines
3.4 KiB
YAML
153 lines
3.4 KiB
YAML
loki:
|
|
# Single binary deployment mode
|
|
deploymentMode: SingleBinary
|
|
|
|
loki:
|
|
# Authentication
|
|
auth_enabled: false
|
|
|
|
# Common configuration
|
|
commonConfig:
|
|
replication_factor: 1
|
|
|
|
# Storage configuration
|
|
schemaConfig:
|
|
configs:
|
|
- from: "2024-01-01"
|
|
store: tsdb
|
|
object_store: s3
|
|
schema: v13
|
|
index:
|
|
prefix: loki_index_
|
|
period: 24h
|
|
|
|
# Storage backend configuration
|
|
storage:
|
|
type: s3
|
|
bucketNames:
|
|
chunks: loki-logs
|
|
ruler: loki-logs
|
|
admin: loki-logs
|
|
s3:
|
|
endpoint: rook-ceph-rgw-ceph-objectstore.rook-ceph.svc:80
|
|
region: us-east-1
|
|
insecure: true
|
|
s3ForcePathStyle: true
|
|
accessKeyId: ${AWS_ACCESS_KEY_ID}
|
|
secretAccessKey: ${AWS_SECRET_ACCESS_KEY}
|
|
|
|
# Limits and retention
|
|
limits_config:
|
|
retention_period: 90d
|
|
ingestion_rate_mb: 10
|
|
ingestion_burst_size_mb: 20
|
|
max_query_series: 10000
|
|
max_query_parallelism: 32
|
|
reject_old_samples: true
|
|
reject_old_samples_max_age: 168h
|
|
|
|
# Compactor configuration for retention
|
|
compactor:
|
|
working_directory: /var/loki/compactor
|
|
compaction_interval: 10m
|
|
retention_enabled: true
|
|
retention_delete_delay: 2h
|
|
retention_delete_worker_count: 150
|
|
|
|
# Storage config
|
|
storage_config:
|
|
tsdb_shipper:
|
|
active_index_directory: /var/loki/tsdb-index
|
|
cache_location: /var/loki/tsdb-cache
|
|
shared_store: s3
|
|
|
|
# Hedging requests
|
|
hedging:
|
|
at: 250ms
|
|
max_per_second: 20
|
|
up_to: 3
|
|
|
|
# Query configuration
|
|
query_scheduler:
|
|
max_outstanding_requests_per_tenant: 2048
|
|
|
|
# Frontend configuration
|
|
frontend:
|
|
max_outstanding_per_tenant: 2048
|
|
|
|
# Single binary configuration
|
|
singleBinary:
|
|
replicas: 1
|
|
persistence:
|
|
enabled: true
|
|
storageClass: ceph-block
|
|
size: 10Gi
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
memory: 1Gi
|
|
|
|
extraEnv:
|
|
- name: AWS_ACCESS_KEY_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: loki-objstore-secret
|
|
key: AWS_ACCESS_KEY_ID
|
|
- name: AWS_SECRET_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: loki-objstore-secret
|
|
key: AWS_SECRET_ACCESS_KEY
|
|
|
|
# Gateway
|
|
gateway:
|
|
enabled: true
|
|
replicas: 1
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
memory: 256Mi
|
|
|
|
# Monitoring
|
|
monitoring:
|
|
selfMonitoring:
|
|
enabled: true
|
|
grafanaAgent:
|
|
installOperator: false
|
|
serviceMonitor:
|
|
enabled: true
|
|
|
|
# Service configuration
|
|
service:
|
|
type: ClusterIP
|
|
|
|
# S3 Bucket and credentials provisioning
|
|
extraObjects:
|
|
# ObjectBucketClaim for Loki logs
|
|
- apiVersion: objectbucket.io/v1alpha1
|
|
kind: ObjectBucketClaim
|
|
metadata:
|
|
name: loki-logs
|
|
namespace: logging
|
|
spec:
|
|
bucketName: loki-logs
|
|
storageClassName: ceph-bucket
|
|
additionalConfig:
|
|
maxSize: "200Gi"
|
|
|
|
# Secret with S3 credentials (populated by Rook from OBC)
|
|
- apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: loki-objstore-secret
|
|
namespace: logging
|
|
type: Opaque
|
|
stringData:
|
|
AWS_ACCESS_KEY_ID: placeholder
|
|
AWS_SECRET_ACCESS_KEY: placeholder
|