cmd/k8s-operator: remove unnecessary timed requeue.

Previously, we had to do blind timed requeues while waiting for
the tailscale hostname, because we looked up the hostname through
the API. But now the proxy container image writes back its hostname
to the k8s secret, so we get an event-triggered reconcile automatically
when the time is right.

Updates #502

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/6744/head
David Anderson 1 year ago committed by Dave Anderson
parent d857fd00b3
commit 835a73cc1f

@ -380,7 +380,7 @@ func (a *ServiceReconciler) Reconcile(ctx context.Context, req reconcile.Request
if err := a.Status().Update(ctx, svc); err != nil {
return reconcile.Result{}, fmt.Errorf("failed to update service status: %w", err)
}
return reconcile.Result{RequeueAfter: 10 * time.Second}, nil
return reconcile.Result{}, nil
}
logger.Debugf("setting ingress hostname to %q", tsHost)

@ -60,7 +60,7 @@ func TestLoadBalancerClass(t *testing.T) {
},
})
expectRequeue(t, sr, "default", "test")
expectReconciled(t, sr, "default", "test")
fullName, shortName := findGenName(t, fc, "default", "test")
@ -394,7 +394,7 @@ func TestLBIntoAnnotation(t *testing.T) {
},
})
expectRequeue(t, sr, "default", "test")
expectReconciled(t, sr, "default", "test")
fullName, shortName := findGenName(t, fc, "default", "test")

Loading…
Cancel
Save