init commit

This commit is contained in:
2026-04-25 14:43:45 +00:00
commit 30af3165e4
26 changed files with 16629 additions and 0 deletions
@@ -0,0 +1,50 @@
---
"kind": "ConfigMap"
"apiVersion": "v1"
"metadata":
"name": "promtail-config"
"namespace": "loki"
"data":
"promtail.yaml": |
server:
http_listen_port: 9080
grpc_listen_port: 0
clients:
- url: http://loki.loki.svc.cluster.local:3100/loki/api/v1/push
positions:
filename: /run/promtail/positions.yaml
scrape_configs:
- job_name: kubernetes-pods
pipeline_stages:
- cri: {}
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: replace
source_labels: [__meta_kubernetes_pod_node_name]
target_label: __host__
- action: replace
source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_name]
regex: (.+)
target_label: app
- action: replace
source_labels: [__meta_kubernetes_pod_label_app]
regex: (.+)
target_label: app
- action: replace
source_labels: [__meta_kubernetes_namespace]
target_label: namespace
- action: replace
source_labels: [__meta_kubernetes_pod_name]
target_label: pod
- action: replace
source_labels: [__meta_kubernetes_pod_container_name]
target_label: container
- action: replace
source_labels: [__meta_kubernetes_pod_uid, __meta_kubernetes_pod_container_name]
separator: /
replacement: /var/log/pods/*$1/*.log
target_label: __path__