diff --git a/module/controllers/proxyassemblage_controller.go b/module/controllers/proxyassemblage_controller.go index 4b26aad..29144c5 100644 --- a/module/controllers/proxyassemblage_controller.go +++ b/module/controllers/proxyassemblage_controller.go @@ -8,6 +8,7 @@ import ( "context" "fmt" "strings" + "time" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/cluster-api/controllers/remote" @@ -20,6 +21,8 @@ import ( fleetv1 "github.com/squaremo/fleeet/module/api/v1alpha1" ) +const proxyPollInterval = 20 * time.Second + // ProxyAssemblageReconciler reconciles a ProxyAssemblage object type ProxyAssemblageReconciler struct { client.Client @@ -84,7 +87,8 @@ func (r *ProxyAssemblageReconciler) Reconcile(ctx context.Context, req ctrl.Requ return ctrl.Result{}, err } - return ctrl.Result{}, nil + // We don't get notified of things happening in the downstream cluster; so, requeue to poll instead. + return ctrl.Result{RequeueAfter: proxyPollInterval}, nil } // SetupWithManager sets up the controller with the Manager.