Skip to content

Commit

Permalink
chore: retry on deploy fail
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianKramm committed Apr 8, 2024
1 parent d2ca0d0 commit cd06458
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pkg/controllers/deploy/start.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
}
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/k8sdefaultendpoint/k8sdefaultendpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit cd06458

Please sign in to comment.