Make inhibitor consider equality labels

This commit is contained in:
Fabian Reinartz 2015-09-27 14:41:18 +02:00
parent 8c15e18571
commit 331911edee

View File

@ -110,5 +110,15 @@ func NewInhibitRule(cr *config.InhibitRule) *InhibitRule {
}
func (r *InhibitRule) Mutes(source, target model.LabelSet) bool {
return r.TargetMatchers.Match(target) && r.SourceMatchers.Match(source)
if r.TargetMatchers.Match(target) && r.SourceMatchers.Match(source) {
for ln := range r.Equal {
if source[ln] != target[ln] {
return false
}
}
} else {
return false
}
return true
}