Skip to content

Commit

Permalink
Fix hardcoded servicename
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Bigler <[email protected]>
  • Loading branch information
TheBigLee committed Jul 16, 2024
1 parent 6ef4e93 commit 95a5b09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/comp-functions/functions/common/instance_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 95a5b09

Please sign in to comment.