replace promtail with alloy
All checks were successful
render-manifests-push / render-manifests-push (push) Successful in 1m3s
lint-test-helm / lint-helm (push) Successful in 1m29s
renovate / renovate (push) Successful in 2m15s

This commit is contained in:
2025-12-27 18:21:45 -06:00
parent c37f9cf23e
commit e28adfce17
3 changed files with 49 additions and 6 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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