From ed8629157f90669143d914d4611d7ffdc933515a Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Fri, 21 Feb 2025 15:43:04 +0100 Subject: [PATCH] Update component multi tenancy how-to for multi-instance aware components --- .../pages/how-tos/component-multi-tenancy.adoc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/how-tos/component-multi-tenancy.adoc b/docs/modules/ROOT/pages/how-tos/component-multi-tenancy.adoc index 8fd606b..9be4c09 100644 --- a/docs/modules/ROOT/pages/how-tos/component-multi-tenancy.adoc +++ b/docs/modules/ROOT/pages/how-tos/component-multi-tenancy.adoc @@ -33,8 +33,20 @@ local appPath = ['%s/' % appPath]: app, <1> } ---- -<1> Replace ` with the component's name. +<1> Replace `` with the component's name. <2> We use `std.get()` here because `commodore component compile` generates an empty application manifest by default. ++ +[NOTE] +==== +If you're making a multi-instance aware component multi-tenant aware, you'll need to make sure that you create an ArgoCD app per instance. +Additionally, you'll need to call `argocd.App()` with the optional parameter `base` set to the component name. + +[source,jsonnet] +---- +local instance = inv.parameters._instance; +local app = argocd.App(instance, params.namespace, secrets=true, base=); +---- +==== . Adjust the component's Kapitan compile step for the application manifests (in `class/.yml`) +