2023-07-05 13:10:47 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: loki
|
|
|
|
namespace: monitoring
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: loki
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: loki
|
|
|
|
spec:
|
2023-07-29 07:39:18 +00:00
|
|
|
securityContext:
|
|
|
|
runAsNonRoot: true
|
|
|
|
fsGroup: 2000
|
|
|
|
runAsUser: 1000
|
2023-07-05 13:10:47 +00:00
|
|
|
containers:
|
|
|
|
- name: loki
|
|
|
|
image: grafana/loki:2.8.2
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
ports:
|
|
|
|
- containerPort: 3100
|
|
|
|
volumeMounts:
|
2023-07-29 07:39:18 +00:00
|
|
|
- name: loki-pv
|
|
|
|
mountPath: /loki
|
2023-07-05 13:10:47 +00:00
|
|
|
- name: loki-config-volume
|
|
|
|
mountPath: /mnt/config/loki-config.yaml
|
|
|
|
subPath: loki-config.yaml
|
|
|
|
volumes:
|
2023-07-29 07:39:18 +00:00
|
|
|
- name: loki-pv
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: loki-pvc
|
2023-07-05 13:10:47 +00:00
|
|
|
- name: loki-config-volume
|
|
|
|
configMap:
|
|
|
|
name: loki-config
|