From f92b98c68034817f03facd49026df136141e2870 Mon Sep 17 00:00:00 2001 From: Aline Abler Date: Mon, 6 Mar 2023 16:06:21 +0100 Subject: [PATCH] Ensure conflict-free multi-instance capabilities --- class/openshift4-operators.yml | 2 +- component/app.jsonnet | 5 +++-- ...shift4-operators.yaml => openshift-operators-custom.yaml} | 0 .../monitoring.yaml | 0 .../openshift-operators-custom.yaml | 0 ...shift4-operators.yaml => openshift-operators-redhat.yaml} | 0 .../monitoring.yaml | 0 .../openshift-operators-redhat.yaml | 0 .../{openshift4-operators.yaml => openshift-operators.yaml} | 0 .../monitoring.yaml | 0 .../openshift-operators.yaml | 0 11 files changed, 4 insertions(+), 3 deletions(-) rename tests/golden/openshift-operators-custom/openshift-operators-custom/apps/{openshift4-operators.yaml => openshift-operators-custom.yaml} (100%) rename tests/golden/openshift-operators-custom/openshift-operators-custom/{openshift4-operators => openshift-operators-custom}/monitoring.yaml (100%) rename tests/golden/openshift-operators-custom/openshift-operators-custom/{openshift4-operators => openshift-operators-custom}/openshift-operators-custom.yaml (100%) rename tests/golden/openshift-operators-redhat/openshift-operators-redhat/apps/{openshift4-operators.yaml => openshift-operators-redhat.yaml} (100%) rename tests/golden/openshift-operators-redhat/openshift-operators-redhat/{openshift4-operators => openshift-operators-redhat}/monitoring.yaml (100%) rename tests/golden/openshift-operators-redhat/openshift-operators-redhat/{openshift4-operators => openshift-operators-redhat}/openshift-operators-redhat.yaml (100%) rename tests/golden/openshift-operators/openshift-operators/apps/{openshift4-operators.yaml => openshift-operators.yaml} (100%) rename tests/golden/openshift-operators/openshift-operators/{openshift4-operators => openshift-operators}/monitoring.yaml (100%) rename tests/golden/openshift-operators/openshift-operators/{openshift4-operators => openshift-operators}/openshift-operators.yaml (100%) diff --git a/class/openshift4-operators.yml b/class/openshift4-operators.yml index 043cbb8..7006775 100644 --- a/class/openshift4-operators.yml +++ b/class/openshift4-operators.yml @@ -8,4 +8,4 @@ parameters: - input_paths: - openshift4-operators/component/main.jsonnet input_type: jsonnet - output_path: openshift4-operators/ + output_path: ${_instance}/ diff --git a/component/app.jsonnet b/component/app.jsonnet index adda5a9..9806590 100644 --- a/component/app.jsonnet +++ b/component/app.jsonnet @@ -2,9 +2,10 @@ local kap = import 'lib/kapitan.libjsonnet'; local inv = kap.inventory(); local params = inv.parameters.openshift4_operators; local argocd = import 'lib/argocd.libjsonnet'; +local instance = inv.parameters._instance; -local app = argocd.App('openshift4-operators', params.namespace); +local app = argocd.App(instance, params.namespace); { - 'openshift4-operators': app, + [instance]: app, } diff --git a/tests/golden/openshift-operators-custom/openshift-operators-custom/apps/openshift4-operators.yaml b/tests/golden/openshift-operators-custom/openshift-operators-custom/apps/openshift-operators-custom.yaml similarity index 100% rename from tests/golden/openshift-operators-custom/openshift-operators-custom/apps/openshift4-operators.yaml rename to tests/golden/openshift-operators-custom/openshift-operators-custom/apps/openshift-operators-custom.yaml diff --git a/tests/golden/openshift-operators-custom/openshift-operators-custom/openshift4-operators/monitoring.yaml b/tests/golden/openshift-operators-custom/openshift-operators-custom/openshift-operators-custom/monitoring.yaml similarity index 100% rename from tests/golden/openshift-operators-custom/openshift-operators-custom/openshift4-operators/monitoring.yaml rename to tests/golden/openshift-operators-custom/openshift-operators-custom/openshift-operators-custom/monitoring.yaml diff --git a/tests/golden/openshift-operators-custom/openshift-operators-custom/openshift4-operators/openshift-operators-custom.yaml b/tests/golden/openshift-operators-custom/openshift-operators-custom/openshift-operators-custom/openshift-operators-custom.yaml similarity index 100% rename from tests/golden/openshift-operators-custom/openshift-operators-custom/openshift4-operators/openshift-operators-custom.yaml rename to tests/golden/openshift-operators-custom/openshift-operators-custom/openshift-operators-custom/openshift-operators-custom.yaml diff --git a/tests/golden/openshift-operators-redhat/openshift-operators-redhat/apps/openshift4-operators.yaml b/tests/golden/openshift-operators-redhat/openshift-operators-redhat/apps/openshift-operators-redhat.yaml similarity index 100% rename from tests/golden/openshift-operators-redhat/openshift-operators-redhat/apps/openshift4-operators.yaml rename to tests/golden/openshift-operators-redhat/openshift-operators-redhat/apps/openshift-operators-redhat.yaml diff --git a/tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift4-operators/monitoring.yaml b/tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift-operators-redhat/monitoring.yaml similarity index 100% rename from tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift4-operators/monitoring.yaml rename to tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift-operators-redhat/monitoring.yaml diff --git a/tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift4-operators/openshift-operators-redhat.yaml b/tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift-operators-redhat/openshift-operators-redhat.yaml similarity index 100% rename from tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift4-operators/openshift-operators-redhat.yaml rename to tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift-operators-redhat/openshift-operators-redhat.yaml diff --git a/tests/golden/openshift-operators/openshift-operators/apps/openshift4-operators.yaml b/tests/golden/openshift-operators/openshift-operators/apps/openshift-operators.yaml similarity index 100% rename from tests/golden/openshift-operators/openshift-operators/apps/openshift4-operators.yaml rename to tests/golden/openshift-operators/openshift-operators/apps/openshift-operators.yaml diff --git a/tests/golden/openshift-operators/openshift-operators/openshift4-operators/monitoring.yaml b/tests/golden/openshift-operators/openshift-operators/openshift-operators/monitoring.yaml similarity index 100% rename from tests/golden/openshift-operators/openshift-operators/openshift4-operators/monitoring.yaml rename to tests/golden/openshift-operators/openshift-operators/openshift-operators/monitoring.yaml diff --git a/tests/golden/openshift-operators/openshift-operators/openshift4-operators/openshift-operators.yaml b/tests/golden/openshift-operators/openshift-operators/openshift-operators/openshift-operators.yaml similarity index 100% rename from tests/golden/openshift-operators/openshift-operators/openshift4-operators/openshift-operators.yaml rename to tests/golden/openshift-operators/openshift-operators/openshift-operators/openshift-operators.yaml