From eca6ba43e0df0fe08571d7b3a8652dfd76b6bde6 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Tue, 7 Jan 2025 17:22:13 +0100 Subject: [PATCH] Update from component template Template version: main (`98d16f9`) --- .cruft.json | 2 +- class/defaults.yml | 1 + class/keycloak.yml | 2 +- component/app.jsonnet | 6 +++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index 67cbfa70..79409fe7 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/projectsyn/commodore-component-template.git", - "commit": "8840f87d25d97ce0d4bfed75d40173caaf4100fc", + "commit": "98d16f99766e6c6d97322dbe42e058f0e2bf73d0", "checkout": "main", "context": { "cookiecutter": { diff --git a/class/defaults.yml b/class/defaults.yml index 1876e53b..f540374d 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -2,6 +2,7 @@ parameters: keycloak: =_metadata: multi_instance: true + multi_tenant: true # make lookup table constant to prevent changes to it through the hierarchy =_enable_pg_chart: # This lookup table controls whether to enable the chart depending on the value of `keycloak.database.provider` diff --git a/class/keycloak.yml b/class/keycloak.yml index d40bcd16..ad565f35 100644 --- a/class/keycloak.yml +++ b/class/keycloak.yml @@ -15,7 +15,7 @@ parameters: - input_paths: - keycloak/component/app.jsonnet input_type: jsonnet - output_path: apps/ + output_path: . - input_paths: - keycloak/component/main.jsonnet input_type: jsonnet diff --git a/component/app.jsonnet b/component/app.jsonnet index 9fb243aa..d8c61629 100644 --- a/component/app.jsonnet +++ b/component/app.jsonnet @@ -18,6 +18,10 @@ local app = argocd.App(instance, params.namespace) { }, }; +local appPath = + local project = std.get(std.get(app, 'spec', {}), 'project', 'syn'); + if project == 'syn' then 'apps' else 'apps-%s' % project; + { - [instance]: app, + ['%s/%s' % [ appPath, instance ]]: app, }