From 8267bad9d033c31925db8d91c8c7802ad9255163 Mon Sep 17 00:00:00 2001 From: simu Date: Tue, 7 Jan 2025 15:22:08 +0000 Subject: [PATCH] Update from template Template version: main (98d16f9) --- .cruft.json | 2 +- class/defaults.yml | 2 ++ class/lieutenant.yml | 2 +- component/app.jsonnet | 6 +++++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index 023eb05..c73d559 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 5b1a3ac..7701197 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -1,5 +1,7 @@ parameters: lieutenant: + =_metadata: + multi_tenant: true namespace: lieutenant images: operator: diff --git a/class/lieutenant.yml b/class/lieutenant.yml index 7d6f9f2..50e4ccf 100644 --- a/class/lieutenant.yml +++ b/class/lieutenant.yml @@ -47,7 +47,7 @@ parameters: - input_paths: - lieutenant/component/app.jsonnet input_type: jsonnet - output_path: apps/ + output_path: . - input_paths: - lieutenant/manifests/crd/bases/${lieutenant:operator:manifest_version}/ input_type: copy diff --git a/component/app.jsonnet b/component/app.jsonnet index 379e150..a25ddd7 100644 --- a/component/app.jsonnet +++ b/component/app.jsonnet @@ -5,6 +5,10 @@ local argocd = import 'lib/argocd.libjsonnet'; local app = argocd.App('lieutenant', params.namespace); +local appPath = + local project = std.get(std.get(app, 'spec', {}), 'project', 'syn'); + if project == 'syn' then 'apps' else 'apps-%s' % project; + { - lieutenant: app, + ['%s/lieutenant' % appPath]: app, }