Skip to content

Commit

Permalink
controllers/vmalert: fixes notifier match condition for namespace sel…
Browse files Browse the repository at this point in the history
…ector

#569
  • Loading branch information
f41gh7 committed Jan 9, 2023
1 parent f20ba3b commit 2290729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/factory/vmalert.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func CreateOrUpdateVMAlert(ctx context.Context, cr *victoriametricsv1beta1.VMAle
return reconcile.Result{}, fmt.Errorf("cannot list alertmanagers for vmalert notifier sd: %w", err)
}
for _, item := range ams.Items {
if !item.DeletionTimestamp.IsZero() && (n.Selector.Namespace != nil && !n.Selector.Namespace.IsMatch(&item)) {
if !item.DeletionTimestamp.IsZero() || (n.Selector.Namespace != nil && !n.Selector.Namespace.IsMatch(&item)) {
continue
}
dsc := item.AsNotifiers()
Expand Down

0 comments on commit 2290729

Please sign in to comment.