From 7fe332c5a57c7f92e3a4df1fd101f2d60059af6d Mon Sep 17 00:00:00 2001 From: Rashi Chaubal <12rashic@gmail.com> Date: Tue, 7 Jan 2025 01:20:13 +0530 Subject: [PATCH 1/3] fixed code refrencing to loft from clihelper.go & helper.go Signed-off-by: Rashi Chaubal <12rashic@gmail.com> --- pkg/platform/clihelper/clihelper.go | 2 +- pkg/platform/helper.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/platform/clihelper/clihelper.go b/pkg/platform/clihelper/clihelper.go index b79e338bfc..70f9e134f0 100644 --- a/pkg/platform/clihelper/clihelper.go +++ b/pkg/platform/clihelper/clihelper.go @@ -165,7 +165,7 @@ func GetLoftIngressHost(ctx context.Context, kubeClient kubernetes.Interface, na } } - return "", fmt.Errorf("couldn't find any host in loft ingress '%s/loft-ingress', please make sure you have not changed any deployed resources", namespace) + return "", fmt.Errorf(product.Replace("couldn't find any host in loft ingress '%s/loft-ingress', please make sure you have not changed any deployed resources"), namespace) } func WaitForReadyLoftPod(ctx context.Context, kubeClient kubernetes.Interface, namespace string, log log.Logger) (*corev1.Pod, error) { diff --git a/pkg/platform/helper.go b/pkg/platform/helper.go index b9f9e8762d..e689b046fa 100644 --- a/pkg/platform/helper.go +++ b/pkg/platform/helper.go @@ -15,6 +15,7 @@ import ( managementv1 "github.com/loft-sh/api/v4/pkg/apis/management/v1" storagev1 "github.com/loft-sh/api/v4/pkg/apis/storage/v1" "github.com/loft-sh/api/v4/pkg/clientset/versioned/scheme" + "github.com/loft-sh/api/v4/pkg/product" "github.com/loft-sh/log" "github.com/loft-sh/log/survey" "github.com/loft-sh/vcluster/pkg/platform/clihelper" @@ -578,7 +579,8 @@ func WaitForSpaceInstance(ctx context.Context, managementClient kube.Interface, if spaceInstance.Status.Phase != storagev1.InstanceReady && spaceInstance.Status.Phase != storagev1.InstanceSleeping { if time.Now().After(nextMessage) { if logged { - log.Infof("Cannot reach space because: %s (%s). Loft will continue waiting, but this operation may timeout", spaceInstance.Status.Message, spaceInstance.Status.Reason) + log.Infof(product.Replace("Cannot reach space because: %s (%s). Loft will continue waiting, but this operation may timeout"), spaceInstance.Status.Message, spaceInstance.Status.Reason) + } else { log.Info("Waiting for space to be available...") } @@ -975,7 +977,7 @@ func WaitForVirtualClusterInstance(ctx context.Context, managementClient kube.In if virtualClusterInstance.Status.Phase != storagev1.InstanceReady && virtualClusterInstance.Status.Phase != storagev1.InstanceSleeping { if time.Now().After(nextMessage) { if logged { - log.Infof("Cannot reach virtual cluster because: %s (%s). Loft will continue waiting, but this operation may timeout", virtualClusterInstance.Status.Message, virtualClusterInstance.Status.Reason) + log.Infof(product.Replace("Cannot reach virtual cluster because: %s (%s). Loft will continue waiting, but this operation may timeout"), virtualClusterInstance.Status.Message, virtualClusterInstance.Status.Reason) } else { log.Info("Waiting for virtual cluster to be available...") } From 789f6baa48bfe61e7bb91a3c8901ce682eef9fa7 Mon Sep 17 00:00:00 2001 From: Rashi Chaubal <12rashic@gmail.com> Date: Tue, 7 Jan 2025 19:26:42 +0530 Subject: [PATCH 2/3] fixed code refrencing to loft from clihelper.go & helper.go 2381 Signed-off-by: Rashi Chaubal <12rashic@gmail.com> --- pkg/platform/clihelper/clihelper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/platform/clihelper/clihelper.go b/pkg/platform/clihelper/clihelper.go index 70f9e134f0..b79e338bfc 100644 --- a/pkg/platform/clihelper/clihelper.go +++ b/pkg/platform/clihelper/clihelper.go @@ -165,7 +165,7 @@ func GetLoftIngressHost(ctx context.Context, kubeClient kubernetes.Interface, na } } - return "", fmt.Errorf(product.Replace("couldn't find any host in loft ingress '%s/loft-ingress', please make sure you have not changed any deployed resources"), namespace) + return "", fmt.Errorf("couldn't find any host in loft ingress '%s/loft-ingress', please make sure you have not changed any deployed resources", namespace) } func WaitForReadyLoftPod(ctx context.Context, kubeClient kubernetes.Interface, namespace string, log log.Logger) (*corev1.Pod, error) { From b8c2122ce33891dcc28a94689d45cf5b403836b3 Mon Sep 17 00:00:00 2001 From: Rashi Chaubal <12rashic@gmail.com> Date: Wed, 8 Jan 2025 13:15:34 +0530 Subject: [PATCH 3/3] fixed client.go code - loft with vCluster platform 2381 Signed-off-by: Rashi Chaubal <12rashic@gmail.com> --- pkg/platform/helper.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/platform/helper.go b/pkg/platform/helper.go index e689b046fa..6d4c531633 100644 --- a/pkg/platform/helper.go +++ b/pkg/platform/helper.go @@ -580,7 +580,6 @@ func WaitForSpaceInstance(ctx context.Context, managementClient kube.Interface, if time.Now().After(nextMessage) { if logged { log.Infof(product.Replace("Cannot reach space because: %s (%s). Loft will continue waiting, but this operation may timeout"), spaceInstance.Status.Message, spaceInstance.Status.Reason) - } else { log.Info("Waiting for space to be available...") }