domino_admin_toolkit.analyzers.node_coverage module
Shared coverage verdict for node-level checks backed by node-exporter.
A node-exporter-backed frame only covers nodes where the exporter runs and is scraped, so
without this verdict a check cannot tell “every node is healthy” from “the nodes I could see
are healthy” — on one production cluster that meant judging 9 of 107 nodes. The analyzer
compares the check’s own frame against the kube-state-metrics inventory
(domino_admin_toolkit.lib.node_pool.fetch_node_inventory()) and emits one result.
- pydantic model domino_admin_toolkit.analyzers.node_coverage.NodeCoverageAnalyzer
Bases:
DataFrameAnalyzerBaseEmits one result describing how much of the cluster a node-level DataFrame observed.
PASS at full coverage, WARN on a partial gap, ERROR once the gap is large enough to invalidate the check’s own verdict, and WARN when the inventory itself is unavailable.
- Fields:
- analyze(data)
Compare the node column of
dataagainst the inventory and record one verdict.- Return type:
- name: ClassVar[str] = 'NodeCoverageAnalyzer'
- domino_admin_toolkit.analyzers.node_coverage.add_node_coverage_result(runner, data, inventory, *, min_coverage_ratio=0.9, source='node-exporter')
Append the coverage verdict to the same Runner that holds the check’s own results.
Constructed directly rather than via
runner.check_df(), which instantiates analyzers with no arguments and so cannot pass the inventory in. Results accumulate on the Runner, so a coverage ERROR fails the check throughpresent_and_assert().- Return type: