122 lines
2.4 KiB
YAML
122 lines
2.4 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: loki-config
|
|
namespace: loki
|
|
data:
|
|
loki-config.yaml: |
|
|
auth_enabled: false
|
|
|
|
server:
|
|
http_listen_port: 3100
|
|
|
|
common:
|
|
path_prefix: /loki
|
|
replication_factor: 1
|
|
ring:
|
|
instance_addr: 127.0.0.1
|
|
kvstore:
|
|
store: inmemory
|
|
|
|
schema_config:
|
|
configs:
|
|
- from: 2024-01-01
|
|
store: tsdb
|
|
object_store: filesystem
|
|
schema: v13
|
|
index:
|
|
prefix: index_
|
|
period: 24h
|
|
|
|
storage_config:
|
|
filesystem:
|
|
directory: /loki/chunks
|
|
tsdb_shipper:
|
|
active_index_directory: /loki/index
|
|
cache_location: /loki/index_cache
|
|
|
|
compactor:
|
|
working_directory: /loki/compactor
|
|
|
|
limits_config:
|
|
allow_structured_metadata: true
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: loki-data
|
|
namespace: loki
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteMany
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
storageClassName: cephfs-hyper
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: loki
|
|
namespace: loki
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: loki
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: loki
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 10001
|
|
runAsGroup: 10001
|
|
fsGroup: 10001
|
|
fsGroupChangePolicy: "OnRootMismatch"
|
|
containers:
|
|
- name: loki
|
|
image: grafana/loki:3.6.7
|
|
args:
|
|
- -config.file=/etc/loki/loki-config.yaml
|
|
- -config.expand-env=true
|
|
ports:
|
|
- name: http
|
|
containerPort: 3100
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/loki
|
|
- name: storage
|
|
mountPath: /loki
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ready
|
|
port: 3100
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /ready
|
|
port: 3100
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: loki-config
|
|
- name: storage
|
|
persistentVolumeClaim:
|
|
claimName: loki-data
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: loki
|
|
namespace: loki
|
|
spec:
|
|
selector:
|
|
app: loki
|
|
ipFamilyPolicy: PreferDualStack
|
|
ipFamilies:
|
|
- IPv6
|
|
- IPv4
|
|
ports:
|
|
- port: 3100
|
|
targetPort: 3100 |