Files

92 lines
2.3 KiB
YAML

controller:
nameOverride: "alloy-node-scrapper"
volumes:
extra:
# requires host journal configuration storage = volatile
- name: run-log-journal
hostPath:
path: /run/log/journal
# Log scrapers (e.g., Alloy/Loki) read this ID from the journal metadata and use it to separate log streams per machine.
- name: etc-machine-id
hostPath:
path: /etc/machine-id
- name: rootfs
hostPath:
path: /
- name: proc
hostPath:
path: /proc
- name: sys
hostPath:
path: /sys
- name: dev
hostPath:
path: /dev
tolerations:
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
- key: "infra.limbosolutions.com/dedicated"
operator: "Exists"
effect: "NoSchedule"
alloy:
mounts:
varlog: true # Mounts /var/log from the host (persistent journal)
extra:
# requires host journal configuration storage = volatile
- name: run-log-journal
mountPath: /run/log/journal
readOnly: true
# required
- name: etc-machine-id
mountPath: /etc/machine-id
readOnly: true
- name: rootfs
mountPath: /host
readOnly: true
- name: proc
mountPath: /host/proc
readOnly: true
- name: sys
mountPath: /host/sys
readOnly: true
- name: dev
mountPath: /host/dev
readOnly: true
# https://grafana.com/docs/alloy/latest/collect/logs-in-kubernetes/
configMap:
create: false
name: alloy-node-scraper
key: config.alloy
extraEnv:
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: CLUSTER_NAME
value: casa
- name: JOB
value: node-exporter
- name: CONTAINER
value: node-exporter
- name: NS
value: monitoring
- name: POD
value: alloy-node-scraper
- name: SERVICE
value: alloy-node-scraper
- name: ZONE
value: casa-vlan
- name: LOKI_URL
valueFrom:
secretKeyRef:
name: alloy-global
key: loki_url
- name: PROMETHEUS_URL
valueFrom:
secretKeyRef:
name: alloy-global
key: prometheus_url