From 217debd8d06d1ca214365b35a9cfb2bbcce5c80e Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Fri, 21 Feb 2025 15:28:19 +0100 Subject: [PATCH] Fix multi-team-awareness check in `ArgoApp()` helper NOTE: We'll need to update all multi-team and multi-instance aware components to pass `base=` when calling this function. --- lib/argocd.libjsonnet | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/argocd.libjsonnet b/lib/argocd.libjsonnet index 7d93299b..db149c42 100644 --- a/lib/argocd.libjsonnet +++ b/lib/argocd.libjsonnet @@ -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