Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/cmd/grafana-agent-operator/example-loki.yaml
4094 views
1
## example-loki.yaml contains a tiny Loki deployment used for testing the
2
## Grafana Agent Operator.
3
4
---
5
6
apiVersion: apps/v1
7
kind: StatefulSet
8
metadata:
9
name: loki
10
namespace: default
11
labels:
12
app: loki
13
spec:
14
serviceName: loki
15
replicas: 1
16
selector:
17
matchLabels:
18
app: loki
19
template:
20
metadata:
21
labels:
22
app: loki
23
spec:
24
containers:
25
- name: loki
26
image: grafana/loki:2.2.1
27
args:
28
- --config.file=/etc/loki/config.yml
29
- --server.http-listen-port=8080
30
ports:
31
- name: http-metrics
32
containerPort: 9090
33
volumeMounts:
34
- mountPath: /etc/loki
35
name: config
36
readOnly: true
37
- mountPath: /var/lib/data
38
name: data
39
volumes:
40
- name: config
41
configMap:
42
name: loki-config
43
- name: data
44
emptyDir: {}
45
46
---
47
48
apiVersion: v1
49
kind: Service
50
metadata:
51
name: loki
52
namespace: default
53
labels:
54
app: loki
55
spec:
56
selector:
57
app: loki
58
ports:
59
- name: http-metrics
60
port: 8080
61
targetPort: 8080
62
63
---
64
65
apiVersion: v1
66
kind: ConfigMap
67
metadata:
68
name: loki-config
69
namespace: default
70
labels:
71
app: loki
72
data:
73
config.yml: |
74
auth_enabled: false
75
server:
76
graceful_shutdown_timeout: 5m
77
http_server_idle_timeout: 120s
78
grpc_server_max_recv_msg_size: 25165824
79
limits_config:
80
enforce_metric_name: false
81
reject_old_samples: true
82
reject_old_samples_max_age: 24h
83
ingester:
84
chunk_idle_period: 5m
85
chunk_retain_period: 30s
86
max_transfer_retries: 1
87
lifecycler:
88
address: 127.0.0.1
89
final_sleep: 0s
90
ring:
91
kvstore:
92
store: inmemory
93
replication_factor: 1
94
schema_config:
95
configs:
96
- from: 2021-07-16
97
store: boltdb
98
object_store: filesystem
99
schema: v11
100
index:
101
prefix: index_
102
period: 24h
103
storage_config:
104
boltdb:
105
directory: /var/lib/data/index
106
filesystem:
107
directory: /var/lib/data/chunks
108
chunk_store_config:
109
max_look_back_period: 0
110
table_manager:
111
retention_deletes_enabled: true
112
retention_period: 48h
113
114