Skip to content

Commit 7a785b4

Browse files
authored
Merge pull request #6 from TrekkieCoder/main
Better error and log handling
2 parents cd97726 + 6ea5744 commit 7a785b4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

managers/ingress.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (r *LoxilbIngressReconciler) Reconcile(ctx context.Context, req ctrl.Reques
6767
// when ingress is added, install rule to loxilb-ingress
6868
models, err := r.createLoxiModelList(ctx, ingress)
6969
if err != nil {
70-
logger.Info("failed to create loxilb loadbalancer model", "error", err)
70+
logger.Error(err, "Failed to set ingress. failed to create loxilb loadbalancer model", "[]loxiapi.LoadBalancerModel", models)
7171
return ctrl.Result{}, err
7272
}
7373

@@ -209,7 +209,7 @@ func (r *LoxilbIngressReconciler) updateIngressStatus(ctx context.Context, ingre
209209
if lbName, isok := ingress.Annotations["loadbalancer-service"]; isok {
210210
lbSvcKey.Name = lbName
211211
} else {
212-
return fmt.Errorf("ingress %s/%s has no information about loadbalancer service", ingress.Namespace, ingress.Name)
212+
return nil
213213
}
214214
}
215215

pkg/loxilb.go

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func SpawnLoxiLB() {
3131
for {
3232
cmd := exec.Command(LoxiLBImg, "--proxyonlymode")
3333
klog.Infof("Spawning loxilb: %s", cmd)
34+
cmd.Stdout = os.Stdout
3435
err := cmd.Run()
3536
if err != nil {
3637
klog.Infof("Spawning loxilb failed: %s", err)

0 commit comments

Comments
 (0)