Skip to content

Commit

Permalink
Allow removing instances from syn.teams (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan authored Oct 3, 2023
1 parent fc8a2b3 commit b430c60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/openshift4-monitoring-prom.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ local prometheusRule(name) =
local teams = params.syn.teams;
local teamsForApp = std.foldl(
function(prev, team)
if std.objectHas(teams, team) && std.objectHas(teams[team], 'instances') && std.member(teams[team].instances, app) then
if std.objectHas(teams, team) && std.objectHas(teams[team], 'instances') && std.member(com.renderArray(teams[team].instances), app) then
prev + [ team ]
else
prev,
Expand Down
2 changes: 2 additions & 0 deletions tests/team-routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ parameters:
instances:
- ns-object
- same-ns-2
- ns-in-base
- ~ns-in-base

openshift4_monitoring:
alertManagerConfig:
Expand Down

0 comments on commit b430c60

Please sign in to comment.