From 92b7442b1139faa124dfd848693f947d67be9338 Mon Sep 17 00:00:00 2001 From: wejdross Date: Fri, 13 Dec 2024 12:51:53 +0100 Subject: [PATCH 1/2] fixing name for nextcloud deployment --- pkg/comp-functions/functions/vshnnextcloud/collabora.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/comp-functions/functions/vshnnextcloud/collabora.go b/pkg/comp-functions/functions/vshnnextcloud/collabora.go index 07b03ff2e..978bb35b2 100644 --- a/pkg/comp-functions/functions/vshnnextcloud/collabora.go +++ b/pkg/comp-functions/functions/vshnnextcloud/collabora.go @@ -540,7 +540,7 @@ func createInstallCollaboraJob(comp *vshnv1.VSHNNextcloud, svc *runtime.ServiceR Command: []string{ "bash", "-cefx", - fmt.Sprintf("oc exec -i deployments/%s -- /install-collabora.sh \"%s\" \"%s\" \"%s\"", comp.GetName(), svc.Config.Data["isOpenshift"], comp.GetName(), comp.Spec.Parameters.Service.Collabora.FQDN), + fmt.Sprintf("oc exec -i deployments/%s -- /install-collabora.sh \"%s\" \"%s\" \"%s\"", comp.GetName()+"-nextcloud", svc.Config.Data["isOpenshift"], comp.GetName(), comp.Spec.Parameters.Service.Collabora.FQDN), }, }, }, From 77497b7c38b11ad23a73d31f49c8255372a01f59 Mon Sep 17 00:00:00 2001 From: wejdross Date: Mon, 16 Dec 2024 09:45:50 +0100 Subject: [PATCH 2/2] updating GetWorkloadName() and switching logic to that --- apis/vshn/v1/vshn_nextcloud.go | 4 +++- pkg/comp-functions/functions/vshnnextcloud/collabora.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apis/vshn/v1/vshn_nextcloud.go b/apis/vshn/v1/vshn_nextcloud.go index 78f2a9601..9c7d94369 100644 --- a/apis/vshn/v1/vshn_nextcloud.go +++ b/apis/vshn/v1/vshn_nextcloud.go @@ -329,8 +329,10 @@ func (v *VSHNNextcloud) GetWorkloadPodTemplateLabelsManager() PodTemplateLabelsM return &DeploymentManager{} } +// This method returns the main workload name of the VSHNExtcloud. +// In this particular case it's deployment name, generated by helm chart. func (v *VSHNNextcloud) GetWorkloadName() string { - return v.GetName() + return v.GetName() + "-nextcloud" } func (v *VSHNNextcloud) GetBillingName() string { diff --git a/pkg/comp-functions/functions/vshnnextcloud/collabora.go b/pkg/comp-functions/functions/vshnnextcloud/collabora.go index 978bb35b2..5fb059cef 100644 --- a/pkg/comp-functions/functions/vshnnextcloud/collabora.go +++ b/pkg/comp-functions/functions/vshnnextcloud/collabora.go @@ -540,7 +540,7 @@ func createInstallCollaboraJob(comp *vshnv1.VSHNNextcloud, svc *runtime.ServiceR Command: []string{ "bash", "-cefx", - fmt.Sprintf("oc exec -i deployments/%s -- /install-collabora.sh \"%s\" \"%s\" \"%s\"", comp.GetName()+"-nextcloud", svc.Config.Data["isOpenshift"], comp.GetName(), comp.Spec.Parameters.Service.Collabora.FQDN), + fmt.Sprintf("oc exec -i deployments/%s -- /install-collabora.sh \"%s\" \"%s\" \"%s\"", comp.GetWorkloadName(), svc.Config.Data["isOpenshift"], comp.GetName(), comp.Spec.Parameters.Service.Collabora.FQDN), }, }, },