fix(redisdistributed): scope Redis alert rules to release namespace - #298
Open
PiyushSingh-ZS wants to merge 1 commit into
Open
fix(redisdistributed): scope Redis alert rules to release namespace#298PiyushSingh-ZS wants to merge 1 commit into
PiyushSingh-ZS wants to merge 1 commit into
Conversation
The 6 alert exprs (RedisMissingMaster, RedisTooManyMasters,
RedisDisconnectedSlaves, RedisReplicationBroken, RedisClusterFlapping,
RedisRejectedConnections) evaluated redis_* metrics cluster-wide,
mislabeling other namespaces' Redis under this release. In multi-tenant
clusters RedisTooManyMasters fired permanently and RedisMissingMaster
never fired.
Add namespace="{{ .Release.Namespace }}" to every metric selector,
matching RedisDown. Bump chart to v0.0.10 and repackage.
Fixes #297
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
charts/redisdistributed/templates/alerts.yamlrendered a per-releasePrometheusRule, but 6 of 7 alert expressions had no namespace selector — they evaluatedredis_*metrics across every namespace in the cluster while stamping this release'snamespace/serviceas static labels. An alert about another namespace's Redis was mislabeled as this release.Two were outright broken in multi-tenant clusters:
count(redis_instance_info{role="master"}) > 1counts every master in every namespace; with ≥2 scraped Redis instances it was permanently true (constant false positive).Fix
Added
namespace="{{ .Release.Namespace }}"to every metric selector, matching whatRedisDownalready does:redis_instance_inforedis_instance_inforedis_connected_slaves(both count/sum)redis_connected_slavesredis_connected_slavesredis_rejected_connections_totalRedisDownwas already correctly scoped and is unchanged.Chart bumped
0.0.9 → v0.0.10, repackaged intodocs/, andindex.yamlregenerated.Type of Change
Checklist
helm lintpasses without errorshelm templaterenders valid YAML with all exprs namespace-scopedFixes #297