- Mount `/vector-data-dir` from host (`/var/lib/vector` via `hostPath`, `DirectoryOrCreate`) so `kubernetes_logs` checkpoints survive pod restarts; resolves conflict with the chart's read-only `/var/lib` default volume - Enable Vector API on `:8686` and wire HTTP `/health` liveness and readiness probes; add `internal_metrics` source and `prometheus_exporter` sink on `:9090` so the `prom-exporter` service port is actually backed by an exporter - Set explicit `targetPort` on the `prom-exporter` port to avoid inference mismatches - Remove the `.message = .message` no-op - Add `node-role.kubernetes.io/control-plane` toleration alongside the legacy `master` key so the DaemonSet schedules on control-plane nodes regardless of cluster age
80 lines
1.4 KiB
YAML
80 lines
1.4 KiB
YAML
---
|
|
role: Agent
|
|
|
|
tolerations:
|
|
- effect: NoSchedule
|
|
key: node-role.kubernetes.io/master
|
|
operator: Exists
|
|
- effect: NoSchedule
|
|
key: node-role.kubernetes.io/control-plane
|
|
operator: Exists
|
|
- effect: NoSchedule
|
|
key: node-role.kubernetes.io/infra
|
|
operator: Exists
|
|
|
|
service:
|
|
ports:
|
|
- name: prom-exporter
|
|
port: 9090
|
|
protocol: TCP
|
|
targetPort: 9090
|
|
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: api
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: api
|
|
|
|
extraVolumes:
|
|
- name: vector-data-dir
|
|
hostPath:
|
|
path: /var/lib/vector
|
|
type: DirectoryOrCreate
|
|
|
|
extraVolumeMounts:
|
|
- name: vector-data-dir
|
|
mountPath: /vector-data-dir
|
|
readOnly: false
|
|
|
|
customConfig:
|
|
data_dir: /vector-data-dir
|
|
|
|
api:
|
|
enabled: true
|
|
address: 0.0.0.0:8686
|
|
playground: false
|
|
|
|
sources:
|
|
kubernetes_logs:
|
|
type: kubernetes_logs
|
|
|
|
internal_metrics:
|
|
type: internal_metrics
|
|
|
|
transforms:
|
|
kubernetes_container_logs:
|
|
type: remap
|
|
inputs:
|
|
- kubernetes_logs
|
|
source: |
|
|
.container = .kubernetes.container_name
|
|
.pod = .kubernetes.pod_name
|
|
.namespace = .kubernetes.pod_namespace
|
|
|
|
sinks:
|
|
default_global_sink:
|
|
type: console
|
|
inputs:
|
|
- kubernetes_container_logs
|
|
encoding:
|
|
codec: json
|
|
|
|
prom_exporter:
|
|
type: prometheus_exporter
|
|
inputs:
|
|
- internal_metrics
|
|
address: 0.0.0.0:9090
|