Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow removing instances from syn.teams #183

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading