Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensures prometheus metrics associated with a deleted node are no long…
…er reported. [ upstream commit e9f97cd ] When a node is deleted from a cluster, metrics associated with that node are still being exported to prometheus. Short of restarting the agent, we want to dynamically delete these metrics when a node is removed from the cluster. This PR ensures node_connectivity_status and node_connectivity_latency no longer report metrics for nodes that are no longer present on the cluster. [ Backporter's notes: Original PR was adapted! ] The original PR depends (mainly!) on 2 other PRs that haven't been backported and are fairly substential. Given this, I've opted to adapt the original implementation to surface the fix while minimizing impact with 2 updates: 1. pkg/metrics/interfaces did not introduce pkg/metrics/metric wrappers as of this release. Hence adapted deletableVec to use the current implementation. (Referring to commit: 84ea383) 2. pkg/node/manager/manager was adapted to provide for metrics deletion when a node is deleted. Subsequent PR refactored the manager metrics structure which the original PR used. (Referring to commit: c49ef45) Signed-off-by: Fernand Galiana <fernand.galiana@isovalent.com>
- Loading branch information