diff --git a/clusters/cl01tl/helm/loki/Chart.lock b/clusters/cl01tl/helm/loki/Chart.lock index d0552fa00..95ef5105f 100644 --- a/clusters/cl01tl/helm/loki/Chart.lock +++ b/clusters/cl01tl/helm/loki/Chart.lock @@ -2,8 +2,8 @@ dependencies: - name: loki repository: https://grafana.github.io/helm-charts version: 6.49.0 -- name: promtail +- name: alloy repository: https://grafana.github.io/helm-charts - version: 6.17.1 -digest: sha256:56aa7fd5ac7a16617b60e4a3f501aeeec1bdfbb3d67a41b45f33d3a4cbbed07e -generated: "2025-12-14T20:36:23.645088704Z" + version: 1.5.1 +digest: sha256:f67da7cd3bea0b23c88a2e1a6f912444d7adcc7cacd690f5dcdf5b4ea7e660bc +generated: "2025-12-27T18:21:05.367034-06:00" diff --git a/clusters/cl01tl/helm/loki/Chart.yaml b/clusters/cl01tl/helm/loki/Chart.yaml index a95f7bfdc..00c03d4e5 100644 --- a/clusters/cl01tl/helm/loki/Chart.yaml +++ b/clusters/cl01tl/helm/loki/Chart.yaml @@ -18,8 +18,11 @@ dependencies: - name: loki version: 6.49.0 repository: https://grafana.github.io/helm-charts - - name: promtail - version: 6.17.1 + # - name: promtail + # version: 6.17.1 + # repository: https://grafana.github.io/helm-charts + - name: alloy + version: 1.5.1 repository: https://grafana.github.io/helm-charts icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/loki.png # renovate: github=grafana/loki diff --git a/clusters/cl01tl/helm/loki/values.yaml b/clusters/cl01tl/helm/loki/values.yaml index 96c752d1c..0da6e20f8 100644 --- a/clusters/cl01tl/helm/loki/values.yaml +++ b/clusters/cl01tl/helm/loki/values.yaml @@ -62,3 +62,43 @@ promtail: clients: - url: http://loki-gateway.loki.svc.cluster.local:80/loki/api/v1/push tenant_id: 1 +alloy: + crds: + create: true + configMap: + create: true + content: | + discovery.kubernetes "pods" { + role = "pod" + } + + discovery.relabel "pod_logs" { + targets = discovery.kubernetes.pods.targets + rule { + source_labels = ["__meta_kubernetes_namespace"] + target_label = "namespace" + } + rule { + source_labels = ["__meta_kubernetes_pod_name"] + target_label = "pod" + } + rule { + source_labels = ["__meta_kubernetes_pod_container_name"] + target_label = "container" + } + } + + loki.source.kubernetes "pod_logs" { + targets = discovery.relabel.pod_logs.output + forward_to = [loki.write.loki_endpoint.receiver] + } + + loki.write "loki_endpoint" { + endpoint { + url = "http://loki-gateway.loki.svc.cluster.local:80/loki/api/v1/push" + } + } + controller: + type: 'daemonset' + serviceMonitor: + enabled: true