GitOps Toolkit controller that patches container image tags in Git
Go to file
Michael Bridgen e45b446b86 Correct directory diffing test and algorithm
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>
2021-10-18 14:49:48 +01:00
.github Use Debian for running unit tests 2021-06-22 11:50:28 +03:00
api Port to conditions helpers 2021-09-09 12:19:02 +01:00
config Port to conditions helpers 2021-09-09 12:19:02 +01:00
controllers Update tests to be compatible with CR > v0.10.0 2021-10-01 21:57:29 +05:30
docs Fix Typo: policiy -> policy 2021-07-14 12:54:13 +01:00
hack Generate docs for v1alpha2 2021-04-13 11:01:45 +01:00
pkg Correct directory diffing test and algorithm 2021-10-18 14:49:48 +01:00
.gitignore Download image reflector v1beta1 API 2021-06-28 13:56:51 +01:00
CHANGELOG.md Release 0.14.1 2021-08-05 17:55:18 +03:00
CODE_OF_CONDUCT.md Add license, DCO and COC 2020-08-11 10:26:03 +03:00
CONTRIBUTING.md Update dependencies 2021-06-10 10:40:28 +02:00
DCO Add license, DCO and COC 2020-08-11 10:26:03 +03:00
Dockerfile Use Debian Slim for the controller base image 2021-06-22 13:58:40 +03:00
LICENSE Add license, DCO and COC 2020-08-11 10:26:03 +03:00
MAINTAINERS Note maintainers shared from fluxcd/flux2 2020-11-27 10:46:57 +00:00
Makefile Update dependencies 2021-08-05 17:27:25 +03:00
PROJECT Graduate v1alpha2 API to v1beta1 2021-06-28 11:26:59 +01:00
README.md Add report, license and release badges to README 2021-04-22 10:37:29 +02:00
go.mod Port to conditions helpers 2021-09-09 12:19:02 +01:00
go.sum Remove legacy_suite_test.go 2021-09-28 18:28:41 +05:30
main.go Use events and metrics helpers 2021-09-15 10:44:30 +01:00

README.md

Image automation controller

CII Best Practices report license release

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.