diff --git a/{{ cookiecutter.slug }}/class/defaults.yml b/{{ cookiecutter.slug }}/class/defaults.yml index b2ae8d4..82ac98a 100644 --- a/{{ cookiecutter.slug }}/class/defaults.yml +++ b/{{ cookiecutter.slug }}/class/defaults.yml @@ -1,4 +1,5 @@ parameters: {{ cookiecutter.parameter_key }}: - =_metadata: {} + =_metadata: + multi_tenant: true namespace: syn-{{ cookiecutter.slug }} diff --git a/{{ cookiecutter.slug }}/class/{{ cookiecutter.slug }}.yml b/{{ cookiecutter.slug }}/class/{{ cookiecutter.slug }}.yml index 6d290f5..d5e1fb7 100644 --- a/{{ cookiecutter.slug }}/class/{{ cookiecutter.slug }}.yml +++ b/{{ cookiecutter.slug }}/class/{{ cookiecutter.slug }}.yml @@ -4,7 +4,7 @@ parameters: - input_paths: - ${_base_directory}/component/app.jsonnet input_type: jsonnet - output_path: apps/ + output_path: . - input_paths: - ${_base_directory}/component/main.jsonnet input_type: jsonnet diff --git a/{{ cookiecutter.slug }}/component/app.jsonnet b/{{ cookiecutter.slug }}/component/app.jsonnet index 00b25d5..8f01a60 100644 --- a/{{ cookiecutter.slug }}/component/app.jsonnet +++ b/{{ cookiecutter.slug }}/component/app.jsonnet @@ -5,10 +5,10 @@ local argocd = import 'lib/argocd.libjsonnet'; local app = argocd.App('{{ cookiecutter.slug }}', params.namespace); +local appPath = + local project = std.get(app, 'spec', { project: 'syn' }).project; + if project == 'syn' then 'apps' else 'apps-%s' % project; + { - {% if '-' in cookiecutter.slug -%} - '{{ cookiecutter.slug }}' - {%- else -%} - {{ cookiecutter.slug }} - {%- endif -%}: app, + ['%s/{{ cookiecutter.slug }}' % appPath]: app, }