From cd06458b089a706897a80e30110f1dabadea2cd6 Mon Sep 17 00:00:00 2001 From: Fabian Kramm Date: Mon, 8 Apr 2024 11:00:37 +0200 Subject: [PATCH] chore: retry on deploy fail --- pkg/controllers/deploy/start.go | 6 ++++-- test/e2e/k8sdefaultendpoint/k8sdefaultendpoint.go | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/controllers/deploy/start.go b/pkg/controllers/deploy/start.go index 43c75762a..526d1dca2 100644 --- a/pkg/controllers/deploy/start.go +++ b/pkg/controllers/deploy/start.go @@ -1,6 +1,8 @@ package deploy import ( + "time" + "github.com/loft-sh/log" "github.com/loft-sh/vcluster/cmd/vclusterctl/cmd" "github.com/loft-sh/vcluster/pkg/config" @@ -37,8 +39,8 @@ func RegisterInitManifestsController(controllerCtx *config.ControllerContext) er for { result, err := controller.Apply(controllerCtx.Context, controllerCtx.Config) if err != nil { - klog.Errorf("Error reconciling init_configmap: %v", err) - break + klog.Errorf("Error deploying manifests: %v", err) + time.Sleep(time.Second * 10) } else if !result.Requeue { break } diff --git a/test/e2e/k8sdefaultendpoint/k8sdefaultendpoint.go b/test/e2e/k8sdefaultendpoint/k8sdefaultendpoint.go index 6a7999b93..25b8a801d 100644 --- a/test/e2e/k8sdefaultendpoint/k8sdefaultendpoint.go +++ b/test/e2e/k8sdefaultendpoint/k8sdefaultendpoint.go @@ -6,6 +6,7 @@ import ( "reflect" "time" + "github.com/ghodss/yaml" "github.com/loft-sh/vcluster/test/framework" "github.com/onsi/ginkgo/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -61,7 +62,9 @@ var _ = ginkgo.Describe("map default/kubernetes endpoint to physical vcluster en } if !reflect.DeepEqual(hostClusterIps, vClusterIps) || !reflect.DeepEqual(hostClusterPorts, vClusterPorts) { - fmt.Println("IPs", hostClusterIps, vClusterIps) + out, _ := yaml.Marshal(vclusterEndpoint) + + fmt.Println("IPs", hostClusterIps, vClusterIps, string(out)) fmt.Println("Ports", hostClusterPorts, vClusterPorts) return false, nil }