alloy pod logs

This commit is contained in:
Philip Haupt
2025-11-14 23:44:36 +01:00
parent 7d9e4708bf
commit 57d7d96a40
2 changed files with 10 additions and 4 deletions

View File

@@ -347,12 +347,15 @@ subjects:
apiVersion: v1
data:
config.alloy: |-
loki.write "local" {
loki.write "default" {
endpoint {
url = "http://loki-gateway.grafana-loki.svc.cluster.local/loki/api/v1/push"
tenant_id = "prod"
}
}
loki.source.kubernetes "pod_logs" {
forward_to = [loki.write.default.receiver]
}
kind: ConfigMap
metadata:
labels:

View File

@@ -34,13 +34,16 @@ alloy:
create: true
# -- Content to assign to the new ConfigMap. This is passed into `tpl` allowing for templating from values.
content: |-
loki.write "local" {
loki.write "default" {
endpoint {
url = "http://loki-gateway.grafana-loki.svc.cluster.local/loki/api/v1/push"
tenant_id = "prod"
}
}
loki.source.kubernetes "pod_logs" {
forward_to = [loki.write.default.receiver]
}
# -- Name of existing ConfigMap to use. Used when create is false.
name: null
# -- Key in ConfigMap to get config from.