Skip to content

Commit

Permalink
Fix multi-team-awareness check in ArgoApp() helper
Browse files Browse the repository at this point in the history
NOTE: We'll need to update all multi-team and multi-instance aware
components to pass `base=<component-name>` when calling this function.
  • Loading branch information
simu committed Feb 21, 2025
1 parent 91a0fed commit 217debd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/argocd.libjsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ local params = inv.parameters.argocd;
*
* See the documentation https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#applications
*/
local ArgoApp(component, namespace, project=null, secrets=true) =
local ArgoApp(component, namespace, project=null, secrets=true, base=null) =
local base_component = if base != null then base else component;
local team = syn_teams.teamForApplication(component);
local proj =
if project != null then (
std.trace('Parameter `project` for `ArgoApp` is deprecated and will be removed in a future version. Set to `%s`' % project, project)
) else if team != syn_teams.owner then (
if syn_teams.isMultiTenantAware(component) then
if syn_teams.isMultiTenantAware(base_component) then
team
else
error
Expand Down

0 comments on commit 217debd

Please sign in to comment.