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 apiVersion: v1
data: data:
config.alloy: |- config.alloy: |-
loki.write "local" { loki.write "default" {
endpoint { endpoint {
url = "http://loki-gateway.grafana-loki.svc.cluster.local/loki/api/v1/push" 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 kind: ConfigMap
metadata: metadata:
labels: labels:

View File

@@ -34,13 +34,16 @@ alloy:
create: true create: true
# -- Content to assign to the new ConfigMap. This is passed into `tpl` allowing for templating from values. # -- Content to assign to the new ConfigMap. This is passed into `tpl` allowing for templating from values.
content: |- content: |-
loki.write "local" { loki.write "default" {
endpoint { endpoint {
url = "http://loki-gateway.grafana-loki.svc.cluster.local/loki/api/v1/push" 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 of existing ConfigMap to use. Used when create is false.
name: null name: null
# -- Key in ConfigMap to get config from. # -- Key in ConfigMap to get config from.