Two steps: 1. TestDiffDirectories did not check if the expected only return value was correct; the intention was there to do so (judging by the comment "change in order"), but my eye for detail failed me. 2. Reversing the directory comparison in the test revealed bugs in the comparison code -- in general, it should skip any directory that is not a directory in the comparator. To make this easier, the code now keeps track of the expected files it saw. That means the check for whether an actual file has an expected counterpart only has two cases, yes or no (rather that trying to account for whether it's a directory and so on). If a directory was skipped while scanning the expected files, it won't be in the actual files anyway. Signed-off-by: Michael Bridgen <mikeb@weave.works> |
||
---|---|---|
.github | ||
api | ||
config | ||
controllers | ||
docs | ||
hack | ||
pkg | ||
.gitignore | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
DCO | ||
Dockerfile | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
PROJECT | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go |
README.md
Image automation controller
This controller automates updates to YAML when new container images are available.
Its sibling, image-reflector-controller, scans container image repositories and reflects the metadata in Kubernetes resources. This controller reacts to that image metadata by updating YAML files in a git repository, and committing the changes.
How to install it
Please see the installation and use guide.
How to work on it
The shared library libgit2
needs to be installed to test or build
locally. The version required corresponds to the version of git2go
(which are Go bindings for libgit2), according to this
table.
See
https://github.com/fluxcd/source-controller/blob/main/CONTRIBUTING.md#installing-required-dependencies
for instructions on how to install libgit2
.