diff --git a/pkg/daemon/sync.go b/pkg/daemon/sync.go index 6807a0edde..5d79c04fc4 100644 --- a/pkg/daemon/sync.go +++ b/pkg/daemon/sync.go @@ -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 {