mirror of
https://github.com/luxfi/monitoring.git
synced 2026-10-30 15:24:48 +00:00
The validator-health exporter and the rpc-tip-gate were both stdlib-only
Python scripts living in ConfigMaps on a stock python image. That choice
bought one thing — no build step — and it cost the backend standard: the
serving side of this stack is Go, and these two are serving processes.
internal/luxd — what one node says it believes (tip, finalized, peers,
bootstrapped, health-with-check-names). /v1 only.
internal/kube — the four apiserver calls fleet health makes. Not
client-go: a scheme, a codec and an informer machinery
to unmarshal four fields is not a dependency, it is a
liability.
internal/fleet — what the numbers MEAN, separated from the process that
serves them, so a metric's meaning can be tested
without a cluster.
Proven, not asserted. Both implementations were pointed at one fake
cluster and diffed:
exporter : 234 lines, 22 metric families — byte-for-byte identical.
tip-gate : same 5 decisions, same 3 merge-patches, byte-for-byte.
The differential earned its keep: the gate had been ported to
eth_getBlockByNumber when the deployed one calls eth_blockNumber. Same
answer today, a different call tomorrow. Fixed to match.
Two deliberate improvements over the Python, neither a scrape-visible
change: exposition series are sorted (Python's thread-completion order
made two scrapes of a steady fleet textually different), and the gate
refuses to start on a missing setting rather than defaulting quietly.
Co-authored-by: Hanzo Dev <[email protected]>
26 lines
731 B
YAML
26 lines
731 B
YAML
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
|
|
# Applied to the lux cluster (do-sfo3-lux-k8s). Collects luxd validator health
|
|
# and ships it to the central Hanzo VictoriaMetrics for alerting.
|
|
# No global namespace transformer: the RoleBindings must stay in the validator
|
|
# namespaces, so every resource sets its own namespace explicitly.
|
|
resources:
|
|
- exporter.yaml
|
|
- vmagent.yaml
|
|
- vmagent-rbac.yaml
|
|
- node-exporter.yaml
|
|
- kube-state-metrics.yaml
|
|
|
|
configMapGenerator:
|
|
- name: lux-validator-vmagent-config
|
|
namespace: lux-system
|
|
files:
|
|
- scrape.yaml=vmagent-scrape.yaml
|
|
|
|
labels:
|
|
- pairs:
|
|
app.kubernetes.io/part-of: lux-validator-health
|
|
brand: lux
|
|
includeSelectors: false
|