Rosenpass rotates the Link A preshared key (rpi wg0 10.10.0.1 <-> siriussec wg0 10.10.0.2) about every two minutes, but WireGuard keeps using the last key it received: a dead or wedged exchange leaves the tunnel up and silently non-post-quantum, with no alerting signal. node-exporter here is distroless without the textfile collector (and without the dbus plumbing --collector.systemd needs), so observe the host directly: - infrastructure/networking/rosenpass/: POSIX sh script run by a 60 s systemd timer on rpi and siriussec that writes /var/lib/node-exporter/textfile/rosenpass.prom. It exports rosenpass_unit_active, rosenpass_psk_rotation_age_seconds and rosenpass_psk_rotation_last_change_timestamp_seconds; the PSK listing is only ever sha256'd, never logged or persisted. - values.yaml: enable --collector.textfile.directory and mount the hostPath (DirectoryOrCreate, so linode's node-exporter still starts). extraArgs replaces the subchart defaults, so the two filesystem exclusions are repeated verbatim. - rosenpass.yaml: RosenpassDown (5 m) and RosenpassPskRotationStalled (age > 900 s, 10 m), both warning, both with absent() arms so a missing series alerts instead of reading as healthy. Host units are installed out of band (see the directory README); the GitOps side needs a merge before Prometheus loads the rules.
291 lines
11 KiB
YAML
291 lines
11 KiB
YAML
# kube-prometheus-stack values — home cluster (Sirius DevOps)
|
|
#
|
|
# Pinned in release.yaml to chart 92.14.0 (appVersion v0.94.2).
|
|
# Everything lands on siriussec: amd64 image (rpi is arm64) + local-path PVs.
|
|
# Prometheus is capped twice (time AND bytes) so a metrics burst can never
|
|
# repeat the ephemeral-storage / DiskPressure incident (see docs/cluster-overview.md).
|
|
|
|
# --- Alertmanager: ON. It is the cluster's only alert sink; without it the
|
|
# 33 PrometheusRules evaluate into nothing (finding F5). The receiver is the
|
|
# dedicated alert bot @Siriusdevops_alert_bot (chat 7528130947) — the same bot
|
|
# the public contact forms use and deliberately NOT the Hermes gateway bot the
|
|
# agent/netsec waker runs on, so a cluster alert can never loop back into the
|
|
# agent. The bot token is NOT in git: it lives in Secret
|
|
# monitoring/alertmanager-telegram (created out of band) and the operator
|
|
# mounts it at /etc/alertmanager/secrets/alertmanager-telegram/bot_token.
|
|
#
|
|
# Routing: default -> telegram. Watchdog (fires forever by design, the
|
|
# dead-man's switch) and the InfoInhibitor meta-alert go to the 'null'
|
|
# blackhole receiver so neither ever pages; info-severity noise (e.g.
|
|
# CPUThrottlingHigh) stays in Prometheus/Grafana without paging. That route is
|
|
# the durable silence — unlike an Alertmanager API silence it lives in git and
|
|
# survives a pod reschedule. The inhibit_rules are the chart defaults (critical
|
|
# inhibits warning/info, warning inhibits info) and are kept as-is.
|
|
alertmanager:
|
|
enabled: true
|
|
apiVersion: v2
|
|
alertmanagerSpec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: siriussec
|
|
resources:
|
|
requests:
|
|
cpu: 20m
|
|
memory: 32Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 128Mi
|
|
# Mounts Secret monitoring/alertmanager-telegram into the pod at
|
|
# /etc/alertmanager/secrets/alertmanager-telegram/ (bot_token key).
|
|
secrets:
|
|
- alertmanager-telegram
|
|
config:
|
|
global:
|
|
resolve_timeout: 5m
|
|
route:
|
|
group_by: ['namespace']
|
|
group_wait: 30s
|
|
group_interval: 5m
|
|
repeat_interval: 12h
|
|
receiver: 'telegram'
|
|
routes:
|
|
- matchers: ['alertname = "Watchdog"']
|
|
receiver: 'null'
|
|
- matchers: ['alertname = "InfoInhibitor"']
|
|
receiver: 'null'
|
|
- matchers: ['severity = "info"']
|
|
receiver: 'null'
|
|
inhibit_rules:
|
|
- source_matchers: ['severity = "critical"']
|
|
target_matchers: ['severity =~ "warning|info"']
|
|
equal: ['namespace', 'alertname']
|
|
- source_matchers: ['severity = "warning"']
|
|
target_matchers: ['severity = "info"']
|
|
equal: ['namespace', 'alertname']
|
|
- source_matchers: ['alertname = "InfoInhibitor"']
|
|
target_matchers: ['severity = "info"']
|
|
equal: ['namespace']
|
|
- target_matchers: ['alertname = "InfoInhibitor"']
|
|
receivers:
|
|
- name: 'null'
|
|
- name: 'telegram'
|
|
telegram_configs:
|
|
- bot_token_file: /etc/alertmanager/secrets/alertmanager-telegram/bot_token
|
|
chat_id: 7528130947
|
|
send_resolved: true
|
|
parse_mode: HTML
|
|
message: |-
|
|
{{ range .Alerts -}}
|
|
<b>{{ if eq .Status "firing" }}FIRING{{ else }}RESOLVED{{ end }} [{{ .Labels.severity }}] {{ .Labels.alertname }}</b>
|
|
{{ .Annotations.summary }}
|
|
{{ .Annotations.description }}
|
|
{{ end }}
|
|
templates:
|
|
- '/etc/alertmanager/config/*.tmpl'
|
|
|
|
defaultRules:
|
|
create: true
|
|
# Control-plane / proxy components that this cluster does not expose to
|
|
# Prometheus: kube-proxy is replaced by Cilium, and the kubeadm static pods
|
|
# only bind their metrics on 127.0.0.1. Rules for them would sit "firing"
|
|
# forever, so drop the whole groups that depend on those targets.
|
|
rules:
|
|
kubeProxy: false
|
|
kubeControllerManager: false
|
|
kubeScheduler: false
|
|
kubeEtcd: false
|
|
# Per-rule opt-out (chart: `defaultRules.disabled.<alertName>`), used instead
|
|
# of dropping a whole group.
|
|
#
|
|
# Group `kubernetes-storage` has five rules. Four of them — both severities of
|
|
# KubePersistentVolumeFillingUp and of KubePersistentVolumeInodesFillingUp —
|
|
# use kubelet_volume_stats_*. That ALPHA metric set was served
|
|
# from kubelet's /metrics/volumes, which was removed in kubelet 1.34
|
|
# (kubernetes/kubernetes#133847, fix #133890). This cluster runs kubelet
|
|
# v1.36.4, /metrics/volumes returns 404 on all three nodes, and Prometheus
|
|
# holds zero series: count(kubelet_volume_stats_used_bytes) -> [] (0 series).
|
|
# Those rules therefore load `health=ok, state=inactive` and can never fire —
|
|
# which reads as "no PVC is filling up" when in reality nothing is measured.
|
|
# Both severities of one alert name are gated by a single `disabled` key.
|
|
#
|
|
# The group's fifth rule, KubePersistentVolumeErrors, is NOT dead — it is
|
|
# built on kube-state-metrics' `kube_persistentvolume_status_phase`, which is
|
|
# live here (40 series across 6 PVs when this landed). It stays in the chart
|
|
# and is deliberately not disabled: this way no working alert is dropped and
|
|
# no chart rule is duplicated by hand.
|
|
disabled:
|
|
KubePersistentVolumeFillingUp: true
|
|
KubePersistentVolumeInodesFillingUp: true
|
|
|
|
# --- Control-plane targets that are unreachable or lift-heavy for a lab box
|
|
kubeProxy:
|
|
enabled: false
|
|
kubeControllerManager:
|
|
enabled: false
|
|
kubeScheduler:
|
|
enabled: false
|
|
kubeEtcd:
|
|
enabled: false
|
|
kubeApiServer:
|
|
enabled: true
|
|
|
|
prometheusOperator:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: siriussec
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
admissionWebhooks:
|
|
patch:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: siriussec
|
|
|
|
prometheus:
|
|
enabled: true
|
|
prometheusSpec:
|
|
# Storage: local-path on siriussec. 10Gi PVC + an 8GB TSDB cap leaves
|
|
# headroom for WAL/checkpoint files inside the same volume.
|
|
retention: 7d
|
|
retentionSize: 8GB
|
|
scrapeInterval: 30s
|
|
evaluationInterval: 30s
|
|
nodeSelector:
|
|
kubernetes.io/hostname: siriussec
|
|
resources:
|
|
requests:
|
|
cpu: 200m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 2Gi
|
|
storageSpec:
|
|
volumeClaimTemplate:
|
|
spec:
|
|
storageClassName: local-path
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
# No remoteWrite / remoteRead / receivers: metrics never leave the cluster.
|
|
|
|
grafana:
|
|
enabled: true
|
|
nodeSelector:
|
|
kubernetes.io/hostname: siriussec
|
|
# Admin credentials live in the monitoring/grafana-admin Secret (created out of
|
|
# band with kubectl, never in git). Keys: admin-user, admin-password.
|
|
admin:
|
|
existingSecret: grafana-admin
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
# Dashboards and datasources are provisioned from ConfigMaps (chart-generated,
|
|
# sidecar-loaded) — nothing is created by hand in the UI.
|
|
defaultDashboardsEnabled: true
|
|
sidecar:
|
|
dashboards:
|
|
enabled: true
|
|
label: grafana_dashboard
|
|
datasources:
|
|
enabled: true
|
|
label: grafana_datasource
|
|
# Persistence: Grafana's own sqlite DB (/var/lib/grafana/grafana.db) now lives
|
|
# on a local-path PVC on siriussec, so an in-app admin-password change and any
|
|
# session/API-key state survive a pod restart. Dashboards + datasources are
|
|
# STILL provisioned from ConfigMaps below and win over UI edits — that is the
|
|
# source of truth, and the reason only credentials/session state needed a PVC.
|
|
# 5Gi is generous for a sqlite DB that is measured in MB; the PV sits next to
|
|
# Prometheus's 10Gi on the same disk.
|
|
persistence:
|
|
enabled: true
|
|
type: pvc
|
|
storageClassName: local-path
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
size: 5Gi
|
|
# A single local-path RWO PVC cannot be mounted by old + new pod at once, so a
|
|
# rolling update deadlocks (new pod Pending on the volume). Recreate is
|
|
# required with persistence enabled. Note: the live Deployment also carried
|
|
# strategy.rollingUpdate from the previous release, which SSA does not drop by
|
|
# omission — that took a one-off patch, see docs/grafana-persistence.md.
|
|
deploymentStrategy:
|
|
type: Recreate
|
|
# Stable session-signing key. Without this Grafana generates a fresh
|
|
# secret_key on every boot, so every existing browser cookie becomes
|
|
# "user token not found" and the client bounces on /. The Secret
|
|
# monitoring/grafana-secret-key is created out of band (never in git).
|
|
envValueFrom:
|
|
GF_SECURITY_SECRET_KEY:
|
|
secretKeyRef:
|
|
name: grafana-secret-key
|
|
key: secret_key
|
|
grafana.ini:
|
|
auth.anonymous:
|
|
enabled: false
|
|
users:
|
|
allow_sign_up: false
|
|
analytics:
|
|
reporting_enabled: false
|
|
|
|
kube-state-metrics:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: siriussec
|
|
resources:
|
|
requests:
|
|
cpu: 20m
|
|
memory: 32Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
|
|
prometheus-node-exporter:
|
|
# DaemonSet on EVERY node (deliberately not pinned to siriussec). The arm64
|
|
# Forgejo runner runs its jobs as *host* Docker containers on rpi, so the disk
|
|
# pressure that matters there is the Pi's root filesystem — invisible to
|
|
# kubelet/cAdvisor, which only describe pods. The runner dashboard's "Pi disk
|
|
# free" panel needs node-exporter on rpi to exist at all, and the same applies
|
|
# to linode. node-exporter is a read-only host-metrics DaemonSet (hostPath
|
|
# /proc + /sys, host network); it adds ~700 series per node, well inside the
|
|
# 8GB retentionSize cap, and rpi's PreferNoSchedule taint does not exclude it.
|
|
#
|
|
# Textfile collector: rosenpass-metrics.sh on rpi/siriussec writes
|
|
# /var/lib/node-exporter/textfile/rosenpass.prom and the DaemonSet serves it
|
|
# from /metrics (alerts: monitoring/controllers/home/rosenpass.yaml, host
|
|
# units: infrastructure/networking/rosenpass/). The image is distroless with
|
|
# no collector enabled, so the flag below is what turns it on.
|
|
#
|
|
# extraArgs REPLACES the subchart default list — Helm replaces lists, it does
|
|
# not merge them. The two filesystem exclusions are copied verbatim from
|
|
# prometheus-node-exporter 4.60.1 (the subchart pinned by kube-prometheus-stack
|
|
# 92.14.0); dropping them would add every container mountpoint to
|
|
# node_filesystem_* and change the disk alerts.
|
|
extraArgs:
|
|
- --collector.textfile.directory=/host/textfile
|
|
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|run/containerd/.+|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
|
|
- --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs|erofs)$
|
|
extraVolumes:
|
|
- name: textfile
|
|
hostPath:
|
|
path: /var/lib/node-exporter/textfile
|
|
# DirectoryOrCreate: nodes with no rosenpass timer (linode) still get a
|
|
# mountable empty directory instead of a CreateContainerConfigError.
|
|
type: DirectoryOrCreate
|
|
extraVolumeMounts:
|
|
- name: textfile
|
|
mountPath: /host/textfile
|
|
readOnly: true
|
|
resources:
|
|
requests:
|
|
cpu: 20m
|
|
memory: 32Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 128Mi
|