infra(logging): Loki single-binary + Alloy DaemonSet, 192h bounded retention (F4)
No log store existed: pod logs were kubelet files on the node and died with the pod (~8h deepest history for a busy workload). Adds: - Loki 3.7.1 single-binary (1 Deployment + 8Gi local-path PVC on siriussec), retention_period 192h with the compactor deleting on filesystem, ingest rate limits, so the store is time- and rate-bounded. - Alloy 1.13.0 DaemonSet (all nodes, no RBAC, no API access) shipping /var/log/pods, /var/log/journal and the Pi's docker json logs. File sources read from byte 0 and stamp the timestamp from the line, so the history the nodes already held (18d cilium on linode, 31d registry on rpi) landed on day one instead of starting the 7-day clock at deploy time. - Grafana datasource (uid loki) via the existing sidecar, ServiceMonitor, ingest-rate guard rule. - docs/logging.md with the measured bytes/day, the 8-day projection and the runbook. Measured: ~360-502 MB/day raw -> ~90 MB/day compressed, 192h -> <=0.8GiB, on a node with 103GiB free (house floor 32GiB). Verified 7-day-old lines return for kube-system cilium-agent and for the siriussec/linode journals, and survive a Loki pod restart (PVC).
This commit is contained in:
parent
ac19ffb340
commit
179257d8fb
10 changed files with 890 additions and 0 deletions
20
clusters/homek8s/logging.yaml
Normal file
20
clusters/homek8s/logging.yaml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: logging
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 10m0s
|
||||
retryInterval: 1m
|
||||
timeout: 5m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
path: ./infrastructure/logging
|
||||
prune: true
|
||||
# Namespace + local-path PVC provisioning come from infrastructure; the
|
||||
# ServiceMonitor/PrometheusRule CRDs come from kube-prometheus-stack via
|
||||
# monitoring, so nothing here is applied before its CRDs exist.
|
||||
dependsOn:
|
||||
- name: infrastructure
|
||||
- name: monitoring
|
||||
Loading…
Reference in a new issue