diff --git a/.cruft.json b/.cruft.json index 321f781..d632155 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/projectsyn/commodore-component-template.git", - "commit": "ff9d5a839714344345b76be069ea23e39e580f38", + "commit": "f12cbb49f928cf689cf39b98d8d7c9e88fb289f6", "checkout": "main", "context": { "cookiecutter": { diff --git a/class/defaults.yml b/class/defaults.yml index 6c1cdc7..e989638 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -1,5 +1,8 @@ parameters: openshift4_logging: + =_metadata: + multi_tenant: true + =_openshift4_console: "True": config: diff --git a/class/openshift4-logging.yml b/class/openshift4-logging.yml index 1abc4b5..c6f0cdd 100644 --- a/class/openshift4-logging.yml +++ b/class/openshift4-logging.yml @@ -4,7 +4,7 @@ parameters: - input_paths: - openshift4-logging/component/app.jsonnet input_type: jsonnet - output_path: apps/ + output_path: . - input_paths: - openshift4-logging/component/main.jsonnet input_type: jsonnet diff --git a/component/app.jsonnet b/component/app.jsonnet index bd5d9f0..37c76ed 100644 --- a/component/app.jsonnet +++ b/component/app.jsonnet @@ -3,14 +3,20 @@ local inv = kap.inventory(); local params = inv.parameters.openshift4_logging; local argocd = import 'lib/argocd.libjsonnet'; -{ - 'openshift4-logging': argocd.App('openshift4-logging', params.namespace) { - spec+: { - syncPolicy+: { - syncOptions+: [ - 'ServerSideApply=true', - ], - }, +local app = argocd.App('openshift4-logging', params.namespace) { + spec+: { + syncPolicy+: { + syncOptions+: [ + 'ServerSideApply=true', + ], }, }, +}; + +local appPath = + local project = std.get(std.get(app, 'spec', {}), 'project', 'syn'); + if project == 'syn' then 'apps' else 'apps-%s' % project; + +{ + ['%s/openshift4-logging' % appPath]: app, }