86 lines
3 KiB
YAML
86 lines
3 KiB
YAML
---
|
|
# Ansible-side knobs for roles/k3s_monitoring — the kube-prometheus-stack
|
|
# Helm chart, deployed via k3s's own bundled helm-controller rather than a
|
|
# helm binary or the kubernetes.core collection (see tasks/main.yml). Lean by
|
|
# design: OpenLens's Metrics feature reads straight off the Prometheus API
|
|
# through the k8s API server proxy, so there's no need for Grafana or
|
|
# Alertmanager in-cluster — both are disabled below, mainly to save RAM on
|
|
# the Pis.
|
|
|
|
k3s_monitoring_namespace: monitoring
|
|
|
|
k3s_monitoring_chart_repo: https://prometheus-community.github.io/helm-charts
|
|
|
|
# Pinned, same reasoning as k3s_version in inventory/group_vars/k3s_cluster.yml
|
|
# — a rebuild months from now should reproduce today's stack, not whatever's
|
|
# newest at the time. Bump deliberately; check the current release first at
|
|
# https://github.com/prometheus-community/helm-charts/releases (tags look
|
|
# like kube-prometheus-stack-X.Y.Z).
|
|
k3s_monitoring_chart_version: "88.3.0"
|
|
|
|
# Handed to the chart verbatim as valuesContent (see templates/). Notes on
|
|
# the less obvious choices:
|
|
# - grafana/alertmanager: off. OpenLens supplies its own dashboards and
|
|
# this cluster doesn't page anyone, so both would just be extra Pi RAM.
|
|
# - kubeControllerManager/kubeScheduler/kubeProxy/kubeEtcd: off. k3s bundles
|
|
# the control plane inside one static binary instead of exposing these as
|
|
# separate systemd units on their usual ports, so kube-prometheus-stack's
|
|
# default scrape targets for them sit permanently "down" — a known false
|
|
# alarm on k3s, not a sign anything's actually broken. kubelet (and the
|
|
# cAdvisor/node metrics it serves) is the one k3s does expose normally,
|
|
# and it's also the one OpenLens's node/pod metrics actually need.
|
|
# - prometheus retention/storage: short retention, no PVC template (so it
|
|
# runs on emptyDir). This stack exists to answer "what are the nodes
|
|
# doing right now", not to keep months of history, so losing the TSDB on
|
|
# a pod restart is an acceptable trade for not standing up persistent
|
|
# storage across 4 SD cards.
|
|
# - every component's resources: sized for a Raspberry Pi 4, not a
|
|
# datacenter node.
|
|
k3s_monitoring_values:
|
|
grafana:
|
|
enabled: false
|
|
alertmanager:
|
|
enabled: false
|
|
kubeApiServer:
|
|
enabled: true
|
|
kubeControllerManager:
|
|
enabled: false
|
|
kubeScheduler:
|
|
enabled: false
|
|
kubeProxy:
|
|
enabled: false
|
|
kubeEtcd:
|
|
enabled: false
|
|
kubelet:
|
|
enabled: true
|
|
prometheusOperator:
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
limits:
|
|
memory: 128Mi
|
|
prometheus:
|
|
prometheusSpec:
|
|
retention: 3d
|
|
scrapeInterval: 30s
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
memory: 512Mi
|
|
kube-state-metrics:
|
|
resources:
|
|
requests:
|
|
cpu: 20m
|
|
memory: 32Mi
|
|
limits:
|
|
memory: 64Mi
|
|
prometheus-node-exporter:
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 16Mi
|
|
limits:
|
|
memory: 32Mi
|