apiVersion: apps/v1 kind: DaemonSet metadata: name: alloy namespace: observability labels: app.kubernetes.io/name: alloy app.kubernetes.io/component: collector app.kubernetes.io/part-of: observability spec: selector: matchLabels: app: alloy template: metadata: labels: app: alloy app.kubernetes.io/name: alloy app.kubernetes.io/component: collector app.kubernetes.io/part-of: observability annotations: prometheus.io/scrape: "true" prometheus.io/port: "12345" spec: serviceAccountName: alloy tolerations: - operator: Exists containers: - name: alloy image: grafana/alloy:v1.19.0 args: - run - /etc/alloy/config.alloy - --storage.path=/var/lib/alloy/data - --server.http.listen-addr=0.0.0.0:12345 - --disable-reporting env: # Used by config.alloy to tail only the pods on the current node. - name: HOSTNAME_NODE valueFrom: fieldRef: fieldPath: spec.nodeName ports: - name: http containerPort: 12345 resources: requests: cpu: 50m memory: 128Mi limits: cpu: "1" memory: 512Mi readinessProbe: httpGet: path: /-/ready port: http initialDelaySeconds: 10 periodSeconds: 10 volumeMounts: - name: config mountPath: /etc/alloy - name: storage mountPath: /var/lib/alloy volumes: - name: config configMap: name: alloy-config - name: storage # Read positions persisted on the node: no full log re-ingestion # when the pod restarts. hostPath: path: /var/lib/alloy type: DirectoryOrCreate