demo-user f1bf0b1e53 logsys: tune loki query capacity and export grafana dashboards 2 months ago
..
scripts 1f89440acf Add logsys Helm chart: Vector+Loki log collection stack with LoadBalancer Loki service 2 months ago
templates f1bf0b1e53 logsys: tune loki query capacity and export grafana dashboards 2 months ago
Chart.yaml 1f89440acf Add logsys Helm chart: Vector+Loki log collection stack with LoadBalancer Loki service 2 months ago
README.md 1f89440acf Add logsys Helm chart: Vector+Loki log collection stack with LoadBalancer Loki service 2 months ago
grafana-shop-recycle-countlog.json f1bf0b1e53 logsys: tune loki query capacity and export grafana dashboards 2 months ago
grafana-shop-recycle-viewlog.json f1bf0b1e53 logsys: tune loki query capacity and export grafana dashboards 2 months ago
values.yaml f1bf0b1e53 logsys: tune loki query capacity and export grafana dashboards 2 months ago

README.md

logsys Helm chart

This chart deploys a complete log collection and storage stack:

  • Loki — Log storage engine (StatefulSet with PersistentVolume)
  • Vector — Log collector agent (DaemonSet)

The Vector agent collects container JSON logs from the shop-recycle namespace and ships parsed labels to Loki and metrics to a Prometheus exporter. Configuration and parsing rules are adapted from the Log.md monitoring guide.

Install

helm upgrade --install vector ./k8s/logsys -n shoprecycle --create-namespace

This single command deploys:

  • Loki StatefulSet with persistent storage (10Gi default)
  • Vector DaemonSet for log collection
  • All ConfigMaps for configuration

Configuration

Loki:

  • loki.enabled — Enable/disable Loki deployment (default: true)
  • loki.namespace — Namespace (default: shoprecycle)
  • loki.replicas — Number of Loki replicas (default: 1)
  • loki.persistence.size — Storage size (default: 10Gi)
  • loki.retention.days — Log retention in days (default: 30)

Vector:

  • vector.enabled — Enable/disable Vector deployment (default: true)
  • vector.loki.endpoint — Loki push endpoint (default: http://loki:3100)
  • vector.logSelector — List of app names to collect (defaults: gateway/order/payment/web)

Usage

After deployment, access Loki via:

kubectl port-forward -n shoprecycle svc/loki 3100:3100

Then configure Grafana to use datasource http://loki:3100.

Notes

  • This chart mounts /var/log from the host on each node.
  • Loki uses filesystem storage with BoltDB for production-style log indexing.
  • Follow the migration steps in Log.md: start with staging dual-write, then canary, then full roll-out.