installer: call reconciler on app install/update/remove
diff --git a/core/installer/tasks/env.go b/core/installer/tasks/env.go
index f5cc0c7..f5978b3 100644
--- a/core/installer/tasks/env.go
+++ b/core/installer/tasks/env.go
@@ -1,10 +1,9 @@
 package tasks
 
 import (
+	"context"
 	"fmt"
 	"net"
-	"net/http"
-	"time"
 
 	"github.com/charmbracelet/keygen"
 
@@ -61,25 +60,19 @@
 			SetupInfra(env, &st)...,
 		)...,
 	)
-	done := make(chan struct{})
+	rctx, done := context.WithCancel(context.Background())
 	t.OnDone(func(_ error) {
-		close(done)
+		done()
 	})
-	go reconcile(fmt.Sprintf("%s-flux", env.PCloudEnvName), done)
-	go reconcile(env.Name, done)
+	pr := NewFluxcdReconciler( // TODO(gio): make reconciler address a flag
+		"http://fluxcd-reconciler.dodo-fluxcd-reconciler.svc.cluster.local",
+		fmt.Sprintf("%s-flux", env.PCloudEnvName),
+	)
+	er := NewFluxcdReconciler(
+		"http://fluxcd-reconciler.dodo-fluxcd-reconciler.svc.cluster.local",
+		env.Name,
+	)
+	go pr.Reconcile(rctx)
+	go er.Reconcile(rctx)
 	return t, DNSZoneRef{"dns-zone", env.Name}
 }
-
-func reconcile(name string, quit chan struct{}) {
-	git := fmt.Sprintf("http://fluxcd-reconciler.dodo-fluxcd-reconciler.svc.cluster.local/source/git/%s/%s/reconcile", name, name)
-	kust := fmt.Sprintf("http://fluxcd-reconciler.dodo-fluxcd-reconciler.svc.cluster.local/kustomization/%s/%s/reconcile", name, name)
-	for {
-		select {
-		case <-time.After(30 * time.Second):
-			http.Get(git)
-			http.Get(kust)
-		case <-quit:
-			return
-		}
-	}
-}
diff --git a/core/installer/tasks/reconciler.go b/core/installer/tasks/reconciler.go
new file mode 100644
index 0000000..461ffc8
--- /dev/null
+++ b/core/installer/tasks/reconciler.go
@@ -0,0 +1,38 @@
+package tasks
+
+import (
+	"context"
+	"fmt"
+	"net/http"
+	"time"
+)
+
+type Reconciler interface {
+	Reconcile(ctx context.Context)
+}
+
+type fluxcdReconciler struct {
+	resources []string
+}
+
+func NewFluxcdReconciler(addr, name string) Reconciler {
+	return fluxcdReconciler{
+		resources: []string{
+			fmt.Sprintf("%s/source/git/%s/%s/reconcile", addr, name, name),
+			fmt.Sprintf("%s/kustomization/%s/%s/reconcile", addr, name, name),
+		},
+	}
+}
+
+func (r fluxcdReconciler) Reconcile(ctx context.Context) {
+	for {
+		select {
+		case <-time.After(30 * time.Second):
+			for _, res := range r.resources {
+				http.Get(res)
+			}
+		case <-ctx.Done():
+			return
+		}
+	}
+}