This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use exactly one clone of the git repo for syncing
If we just clone the repo at the branch HEAD whenever the operator wants to apply a change, we may end up undoing, or redoing, work, since the ChartChangeSync only advances the revision it looks at when it's ready to. To avoid that, pass the desired reconcilations to the ChartChangeSync and have it do the work, at the revision it's currently working from. The mechanism is to send the resource in question on an unbuffered channel, and receive it in the Run loop of ChartChangeSync. This has a couple of flaws: - the event handlers have to wait for the Run loop to get around to doing the work (or time out and retry); - there's not much point in running more than one worker to process events, since they all get serialised through the ChartChangeSync anyway (not quite true -- deletes are done straight away because they don't need to consult the git repo) But it is good enough for now.
- Loading branch information
Showing
2 changed files
with
51 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters