tweak: set sync-timeout
@@ -45,6 +45,9 @@ type changeSet struct {
// Sync starts the synchronization of the cluster with git.
func (d *Daemon) Sync(ctx context.Context, started time.Time, newRevision string, rat ratchet) error {
+ ctx, cancel := context.WithTimeout(ctx, d.SyncTimeout)
+ defer cancel()
+
// Load last-synced resources for comparison
lastResources, err := d.getLastResources(ctx, rat)
if err != nil {
