Files
devops-infra-helm-charts-gcp/helm-overrides/k8s-admin-prd-ase1/prometheus/custom-values.yaml
T
Mukul SharmaandClaude Opus 5 6677c9e315 prometheus: turn on node-exporter for host-level metrics
The other three disabled subcharts (alertmanager/kube-state-metrics/
pushgateway) stay off — none of them do anything cAdvisor's per-container
metrics don't already cover for this deployment's actual purpose.
node-exporter is different: it's the one thing here that would report on
the node itself (disk, memory, load) rather than any particular
container, which matters on an 8GB single node already near its ceiling.

One DaemonSet pod, hostNetwork rather than a Service, resources capped
at 32Mi/64Mi — light enough that turning it on doesn't meaningfully
touch the budget the other three would have.

Verified with `helm template`: the DaemonSet renders with hostNetwork/
hostPID true and the trimmed resources, and its Service carries the
`prometheus.io/scrape: true` annotation the server's already-enabled
kubernetes-service-endpoints job picks up automatically — no separate
scrape config needed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wajog7nELA3i8JWTjxYGHF
2026-09-06 07:56:22 +05:30

67 lines
2.7 KiB
YAML

prometheus:
# alertmanager/kube-state-metrics/node-exporter/pushgateway are all
# enabled by default in this chart. None of the four are needed for
# what actually consumes this deployment — toolshed's per-app CPU/memory
# come straight from kubelet's own cAdvisor endpoint (the
# kubernetes-nodes-cadvisor scrape job below, built into the server
# itself) — but node-exporter earns its keep separately: this box is an
# 8GB single node already near its ceiling, and node-exporter is the one
# thing here that would actually say so (host disk/memory/load, not
# per-container usage cAdvisor already covers). One DaemonSet pod on one
# node, hostNetwork rather than a Service — light enough to justify on
# its own.
#
# alertmanager/kube-state-metrics/pushgateway stay off: nothing here
# defines alerting rules to route (alertmanager), nothing needs
# deployment/rollout-status metrics yet as opposed to raw resource usage
# (kube-state-metrics), and nothing is a short-lived batch job pushing
# its own metrics (pushgateway). Each is a real pod this node has no
# spare room for — turn one on when something concrete needs it, not
# preemptively.
alertmanager:
enabled: false
kube-state-metrics:
enabled: false
prometheus-node-exporter:
enabled: true
resources:
requests:
cpu: 20m
memory: 32Mi
limits:
memory: 64Mi
prometheus-pushgateway:
enabled: false
server:
persistentVolume:
# local-path-provisioner, this cluster's default StorageClass —
# installed right after Cilium precisely because kubeadm ships no
# default (unlike k3s). 3Gi rather than the chart's 8Gi default:
# `retention: 7d` below on one small cluster's worth of series
# comfortably fits, and the node has no room to spare. Not
# resizable in place with this provisioner, so sized deliberately
# rather than grown later.
size: 3Gi
storageClass: local-path
# 7 days, not the chart's 15-day default — a homelab whose entire
# purpose is proving a CI/CD pipeline has no use for a month of
# historical series, and every extra day is disk this node does not
# have spare.
retention: 7d
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
memory: 512Mi
# The default kubernetes-nodes-cadvisor job (scheme https, bearer token
# from the pod's own ServiceAccount, metrics_path /metrics/cadvisor) is
# left exactly as the chart ships it — this is what
# container_cpu_usage_seconds_total and container_memory_working_set_bytes
# come from, and toolshed's metrics connection (internal/metrics)
# queries exactly those two, summed by namespace.