loki

by 4ops

Helm chartv1.7.3App 2.2.1Verified publisher

Loki: like Prometheus, but for logs.

About this chart

loki

Loki: like Prometheus, but for logs.

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add kube-ops https://charts.kube-ops.io
$ helm repo update
$ helm upgrade my-release kube-ops/loki --install --namespace my-namespace --create-namespace --wait

Uninstalling the Chart

To uninstall the chart:

$ helm uninstall my-release --namespace my-namespace

Values

KeyTypeDefaultDescription
affinityobject{}Affinity for pod assignment ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
alertingGroupslist[]
annotationsobject{}
authEnabledboolfalseEnables authentication through the X-Scope-OrgID header, which must be present if true. If false, the OrgID will always be set to "fake".
autoscaling.enabledboolfalseSpecifies the horizontal pod autoscaling is enabled
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
chunkStoreConfigobject{"cacheLookupsOlderThan":"0s","chunkCacheConfig":{"background":{"writebackBuffer":10000,"writebackGoroutines":10},"defaultValidity":"1h","enableFifocache":false,"fifocache":{"maxSizeBytes":"","maxSizeItems":0,"validity":"0s"},"memcached":{"batchSize":262144,"expiration":"1h","parallelism":100},"memcachedClient":{"consistentHash":true,"host":"","maxIdleConns":100,"service":"memcached","timeout":"100ms","updateInterval":"1m"},"redis":{"db":1,"endpoint":"","expiration":"0s","idleTimeout":"0s","masterName":"","maxConnectionAge":"0s","password":"","poolSize":0,"timeout":"100ms"}},"maxLookBackPeriod":"0s","writeDedupeCacheConfig":{"background":{"writebackBuffer":10000,"writebackGoroutines":10},"defaultValidity":"1h","enableFifocache":false,"fifocache":{"maxSizeBytes":"","maxSizeItems":0,"validity":"0s"},"memcached":{"batchSize":262144,"expiration":"1h","parallelism":100},"memcachedClient":{"consistentHash":true,"host":"","maxIdleConns":100,"service":"memcached","timeout":"100ms","updateInterval":"1m"},"redis":{"db":1,"endpoint":"","expiration":"0s","idleTimeout":"0s","masterName":"","maxConnectionAge":"0s","password":"","poolSize":0,"timeout":"100ms"}}}Configures how Loki will store data in the specific store.
chunkStoreConfig.cacheLookupsOlderThanstring"0s"Cache index entries older than this period. Default is disabled.
chunkStoreConfig.chunkCacheConfigobject{"background":{"writebackBuffer":10000,"writebackGoroutines":10},"defaultValidity":"1h","enableFifocache":false,"fifocache":{"maxSizeBytes":"","maxSizeItems":0,"validity":"0s"},"memcached":{"batchSize":262144,"expiration":"1h","parallelism":100},"memcachedClient":{"consistentHash":true,"host":"","maxIdleConns":100,"service":"memcached","timeout":"100ms","updateInterval":"1m"},"redis":{"db":1,"endpoint":"","expiration":"0s","idleTimeout":"0s","masterName":"","maxConnectionAge":"0s","password":"","poolSize":0,"timeout":"100ms"}}The cache configuration for storing chunks
chunkStoreConfig.chunkCacheConfig.backgroundobject{"writebackBuffer":10000,"writebackGoroutines":10}Configures the background cache when memcached is used.
chunkStoreConfig.chunkCacheConfig.background.writebackBufferint10000How many chunks to buffer for background write back to memcached.
chunkStoreConfig.chunkCacheConfig.background.writebackGoroutinesint10How many goroutines to use to write back to memcached.
chunkStoreConfig.chunkCacheConfig.defaultValiditystring"1h"The default validity of entries for caches unless overridden.
chunkStoreConfig.chunkCacheConfig.enableFifocacheboolfalseEnable in-memory cache.
chunkStoreConfig.chunkCacheConfig.fifocache.maxSizeBytesstring""Maximum number of entries in the cache.
chunkStoreConfig.chunkCacheConfig.fifocache.validitystring"0s"The expiry duration for the cache.
chunkStoreConfig.chunkCacheConfig.memcachedobject{"batchSize":262144,"expiration":"1h","parallelism":100}Configures memcached settings.
chunkStoreConfig.chunkCacheConfig.memcached.batchSizeint262144Configures how many keys to fetch in each batch request.
chunkStoreConfig.chunkCacheConfig.memcached.expirationstring"1h"Configures how long keys stay in memcached.
chunkStoreConfig.chunkCacheConfig.memcached.parallelismint100Maximum active requests to memcached.
chunkStoreConfig.chunkCacheConfig.memcachedClientobject{"consistentHash":true,"host":"","maxIdleConns":100,"service":"memcached","timeout":"100ms","updateInterval":"1m"}Configures how to connect to one or more memcached servers.
chunkStoreConfig.chunkCacheConfig.memcachedClient.consistentHashbooltrueWhether or not to use a consistent hash to discover multiple memcached servers.
chunkStoreConfig.chunkCacheConfig.memcachedClient.hoststring""The hostname to use for memcached services when caching chunks. If empty, no memcached will be used. A SRV lookup will be used.
chunkStoreConfig.chunkCacheConfig.memcachedClient.maxIdleConnsint100The maximum number of idle connections in the memcached client pool.
chunkStoreConfig.chunkCacheConfig.memcachedClient.servicestring"memcached"SRV service used to discover memcached servers.
chunkStoreConfig.chunkCacheConfig.memcachedClient.timeoutstring"100ms"Maximum time to wait before giving up on memcached requests.
chunkStoreConfig.chunkCacheConfig.memcachedClient.updateIntervalstring"1m"The period with which to poll the DNS for memcached servers.
chunkStoreConfig.chunkCacheConfig.redis.dbint1Database index.
chunkStoreConfig.chunkCacheConfig.redis.endpointstring""Redis Server endpoint to use for caching. A comma-separated list of endpoints for Redis Cluster or Redis Sentinel. If empty, no redis will be used.
chunkStoreConfig.chunkCacheConfig.redis.expirationstring"0s"How long keys stay in the redis.
chunkStoreConfig.chunkCacheConfig.redis.idleTimeoutstring"0s"Close connections after remaining idle for this duration. If the value is zero, then idle connections are not closed.
chunkStoreConfig.chunkCacheConfig.redis.masterNamestring""Redis Sentinel master name. An empty string for Redis Server or Redis Cluster.
chunkStoreConfig.chunkCacheConfig.redis.maxConnectionAgestring"0s"Close connections older than this duration. If the value is zero, then the pool does not close connections based on age.
chunkStoreConfig.chunkCacheConfig.redis.passwordstring""Password to use when connecting to redis.
chunkStoreConfig.chunkCacheConfig.redis.poolSizeint0Maximum number of connections in the pool.
chunkStoreConfig.chunkCacheConfig.redis.timeoutstring"100ms"Maximum time to wait before giving up on redis requests.
chunkStoreConfig.maxLookBackPeriodstring"0s"Limit how long back data can be queried. Default is disabled. This should always be set to a value less than or equal to what is set in tableManager.retentionPeriod .
chunkStoreConfig.writeDedupeCacheConfigobject{"background":{"writebackBuffer":10000,"writebackGoroutines":10},"defaultValidity":"1h","enableFifocache":false,"fifocache":{"maxSizeBytes":"","maxSizeItems":0,"validity":"0s"},"memcached":{"batchSize":262144,"expiration":"1h","parallelism":100},"memcachedClient":{"consistentHash":true,"host":"","maxIdleConns":100,"service":"memcached","timeout":"100ms","updateInterval":"1m"},"redis":{"db":1,"endpoint":"","expiration":"0s","idleTimeout":"0s","masterName":"","maxConnectionAge":"0s","password":"","poolSize":0,"timeout":"100ms"}}The cache configuration for deduplicating writes
chunkStoreConfig.writeDedupeCacheConfig.backgroundobject{"writebackBuffer":10000,"writebackGoroutines":10}Configures the background cache when memcached is used.
chunkStoreConfig.writeDedupeCacheConfig.background.writebackBufferint10000How many chunks to buffer for background write back to memcached.
chunkStoreConfig.writeDedupeCacheConfig.background.writebackGoroutinesint10How many goroutines to use to write back to memcached.
chunkStoreConfig.writeDedupeCacheConfig.defaultValiditystring"1h"The default validity of entries for caches unless overridden.
chunkStoreConfig.writeDedupeCacheConfig.enableFifocacheboolfalseEnable in-memory cache.
chunkStoreConfig.writeDedupeCacheConfig.fifocache.maxSizeBytesstring""Maximum number of entries in the cache.
chunkStoreConfig.writeDedupeCacheConfig.fifocache.validitystring"0s"The expiry duration for the cache.
chunkStoreConfig.writeDedupeCacheConfig.memcachedobject{"batchSize":262144,"expiration":"1h","parallelism":100}Configures memcached settings.
chunkStoreConfig.writeDedupeCacheConfig.memcached.batchSizeint262144Configures how many keys to fetch in each batch request.
chunkStoreConfig.writeDedupeCacheConfig.memcached.expirationstring"1h"Configures how long keys stay in memcached.
chunkStoreConfig.writeDedupeCacheConfig.memcached.parallelismint100Maximum active requests to memcached.
chunkStoreConfig.writeDedupeCacheConfig.memcachedClientobject{"consistentHash":true,"host":"","maxIdleConns":100,"service":"memcached","timeout":"100ms","updateInterval":"1m"}Configures how to connect to one or more memcached servers.
chunkStoreConfig.writeDedupeCacheConfig.memcachedClient.consistentHashbooltrueWhether or not to use a consistent hash to discover multiple memcached servers.
chunkStoreConfig.writeDedupeCacheConfig.memcachedClient.hoststring""The hostname to use for memcached services when caching chunks. If empty, no memcached will be used. A SRV lookup will be used.
chunkStoreConfig.writeDedupeCacheConfig.memcachedClient.maxIdleConnsint100The maximum number of idle connections in the memcached client pool.
chunkStoreConfig.writeDedupeCacheConfig.memcachedClient.servicestring"memcached"SRV service used to discover memcached servers.
chunkStoreConfig.writeDedupeCacheConfig.memcachedClient.timeoutstring"100ms"Maximum time to wait before giving up on memcached requests.
chunkStoreConfig.writeDedupeCacheConfig.memcachedClient.updateIntervalstring"1m"The period with which to poll the DNS for memcached servers.
chunkStoreConfig.writeDedupeCacheConfig.redis.dbint1Database index.
chunkStoreConfig.writeDedupeCacheConfig.redis.endpointstring""Redis Server endpoint to use for caching. A comma-separated list of endpoints for Redis Cluster or Redis Sentinel. If empty, no redis will be used.
chunkStoreConfig.writeDedupeCacheConfig.redis.expirationstring"0s"How long keys stay in the redis.
chunkStoreConfig.writeDedupeCacheConfig.redis.idleTimeoutstring"0s"Close connections after remaining idle for this duration. If the value is zero, then idle connections are not closed.
chunkStoreConfig.writeDedupeCacheConfig.redis.masterNamestring""Redis Sentinel master name. An empty string for Redis Server or Redis Cluster.
chunkStoreConfig.writeDedupeCacheConfig.redis.maxConnectionAgestring"0s"Close connections older than this duration. If the value is zero, then the pool does not close connections based on age.
chunkStoreConfig.writeDedupeCacheConfig.redis.passwordstring""Password to use when connecting to redis.
chunkStoreConfig.writeDedupeCacheConfig.redis.poolSizeint0Maximum number of connections in the pool.
chunkStoreConfig.writeDedupeCacheConfig.redis.timeoutstring"100ms"Maximum time to wait before giving up on redis requests.
compactorobject{}
deploymentTypestring"StatefulSet"
distributorobject{}
dnsConfigobject{}
dnsPolicystring""
ephemeralContainerslist[]
extraArgslist[]Additional CLI arguments for application
extraContainerslist[]Specifies additional containers
extraEnvVarslist[]Additional environment variables
extraVolumeMountslist[]
extraVolumeslist[]Additional mounts for application
frontendobject{"compressResponses":false,"downstreamUrl":"","logQueriesLongerThan":"0s","maxOutstandingPerTenant":100}Configures the Loki query-frontend.
frontend.compressResponsesboolfalseCompress HTTP responses.
frontend.downstreamUrlstring""URL of downstream Prometheus.
frontend.logQueriesLongerThanstring"0s"Log queries that are slower than the specified duration. Set to 0 to disable. Set to < 0 to enable on all queries.
frontend.maxOutstandingPerTenantint100Maximum number of outstanding requests per tenant per frontend; requests beyond this error with HTTP 429.
frontendWorkerobject{}
fullnameOverridestring""Overrides the full name
global.imagePullPolicystring"IfNotPresent"Image download policy ref: https://

Deploy loki with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has loki on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartloki is pinned at v1.7.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply