diff --git a/docs/sources/configure/examples/configuration-examples.md b/docs/sources/configure/examples/configuration-examples.md index 9ab9921509114..047514aae278a 100644 --- a/docs/sources/configure/examples/configuration-examples.md +++ b/docs/sources/configure/examples/configuration-examples.md @@ -23,7 +23,7 @@ common: kvstore: store: inmemory replication_factor: 1 - path_prefix: /tmp/loki + path_prefix: /var/lib/loki schema_config: configs: @@ -37,7 +37,7 @@ schema_config: storage_config: filesystem: - directory: /tmp/loki/chunks + directory: /var/lib/loki/chunks ``` @@ -146,7 +146,7 @@ storage_config: # This is a partial configuration to deploy Loki backed by Baidu Object Storage (BOS). # The index will be shipped to the storage via tsdb-shipper. common: - path_prefix: /tmp/loki + path_prefix: /var/lib/loki schema_config: configs: diff --git a/docs/sources/configure/examples/yaml/1-Local-Configuration-Example.yaml b/docs/sources/configure/examples/yaml/1-Local-Configuration-Example.yaml index 5d575922d3d07..c7c21ec6b88cd 100644 --- a/docs/sources/configure/examples/yaml/1-Local-Configuration-Example.yaml +++ b/docs/sources/configure/examples/yaml/1-Local-Configuration-Example.yaml @@ -12,7 +12,7 @@ common: kvstore: store: inmemory replication_factor: 1 - path_prefix: /tmp/loki + path_prefix: /var/lib/loki schema_config: configs: @@ -26,4 +26,4 @@ schema_config: storage_config: filesystem: - directory: /tmp/loki/chunks + directory: /var/lib/loki/chunks diff --git a/docs/sources/configure/examples/yaml/5-BOS-Example.yaml b/docs/sources/configure/examples/yaml/5-BOS-Example.yaml index 5367106ed42da..d650305bc6def 100644 --- a/docs/sources/configure/examples/yaml/5-BOS-Example.yaml +++ b/docs/sources/configure/examples/yaml/5-BOS-Example.yaml @@ -1,7 +1,7 @@ # This is a partial configuration to deploy Loki backed by Baidu Object Storage (BOS). # The index will be shipped to the storage via tsdb-shipper. common: - path_prefix: /tmp/loki + path_prefix: /var/lib/loki schema_config: configs: diff --git a/operator/internal/manifests/var.go b/operator/internal/manifests/var.go index 032e3899f336c..926853dc2ba67 100644 --- a/operator/internal/manifests/var.go +++ b/operator/internal/manifests/var.go @@ -49,9 +49,11 @@ const ( storageVolumeName = "storage" rulePartsSeparator = "___" - walDirectory = "/tmp/wal" - dataDirectory = "/tmp/loki" - rulesStorageDirectory = "/tmp/rules" + walDirectory = "/var/lib/loki/wal" + dataDirectory = "/var/lib/loki" + // rulesStorageDirectory is the persistent storage path for rules. + // It aligns with the default used by the official Helm chart. + rulesStorageDirectory = "/var/lib/loki/rules" rulerContainerName = "loki-ruler"