-
Notifications
You must be signed in to change notification settings - Fork 0
/
loki-deployment.yaml
44 lines (44 loc) · 1.03 KB
/
loki-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
apiVersion: apps/v1
kind: Deployment
metadata:
name: loki
spec:
replicas: 1
selector:
matchLabels:
app: loki
template:
metadata:
labels:
app: loki
spec:
securityContext:
fsGroup: 10001
initContainers:
- name: init-chown-data
image: busybox:1.28
command: ["sh", "-c", "mkdir -p /data/loki/chunks /data/loki/index /data/loki/wal && chown -R 10001:10001 /data"]
volumeMounts:
- name: storage
mountPath: /data
containers:
- name: loki
image: grafana/loki:2.4.0
ports:
- containerPort: 3100
securityContext:
runAsUser: 10001
runAsGroup: 10001
volumeMounts:
- name: config
mountPath: /etc/loki/local-config.yaml
subPath: loki.yaml
- name: storage
mountPath: /data
volumes:
- name: config
configMap:
name: loki-config
- name: storage
persistentVolumeClaim:
claimName: loki-storage