This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
Rewrite helm operator to use same git code as fluxd #1240
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The go-git package seems to introduce a host of problems, especially
with SSH, that are obviated by using the git binary.
Given a couple of modest additions to github.com/weaveworks/flux/git,
we can use that instead. Namely: read-only repos, and repo "exports"
(that is, clones that come with only the ability to look at the
files). Those changes are introduced in #1238.
It also turns out that it's possible to simplify the chartsync and
releasesync packages. Given the whole picture in the existing code,
it's possible to boild it down to two mechanically simple processes:
and checks whether they've changed since the last commit;
don't have corresponding releases, and upgrades any that do and
differ.
(In fact, just the latter would be fine since new commits would result
in release diffs; but it's more eventual than having both).
Since these are now fairly compact, I've just merged them into the
chartsync package. I've removed the releasesync_tests.go here, since
it tested internal machinery that no longer exists, but I ought to
replace the test coverage forthwith.
(Once #1238 is merged, I'm going to play the 'it's an alpha' card and merge this too. Comments welcome in the mean time.)