From 95a5b09c7ec6ce9991bb2bc24763eb079c9d4ebf Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Fri, 12 Jul 2024 14:34:08 +0200 Subject: [PATCH] Fix hardcoded servicename Signed-off-by: Nicolas Bigler --- pkg/comp-functions/functions/common/instance_namespace.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/comp-functions/functions/common/instance_namespace.go b/pkg/comp-functions/functions/common/instance_namespace.go index 184994fe1..80ecdc69b 100644 --- a/pkg/comp-functions/functions/common/instance_namespace.go +++ b/pkg/comp-functions/functions/common/instance_namespace.go @@ -100,12 +100,17 @@ func createInstanceNamespace(serviceName, compName, claimNamespace, instanceName svc.AddResult(runtime.NewWarningResult("cannot get claim namespace")) } + mode := "standalone" + if _, exists := svc.Config.Data["mode"]; exists { + mode = svc.Config.Data["mode"] + } + ns := &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: instanceNamespace, Labels: map[string]string{ - "appcat.vshn.io/servicename": serviceName + "-standalone", + "appcat.vshn.io/servicename": serviceName + "-" + mode, "appcat.vshn.io/claim-namespace": claimNamespace, "appcat.vshn.io/claim-name": claimName, "appuio.io/no-rbac-creation": "true",