Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Manifest Factorization through .flux.yaml config files #1848
Want to test this? Go to https://github.com/weaveworks/flux-kustomize-example and follow the instructions.
This feature (behind the flag --manifest-generation) is now available in our prereleases repo: https://hub.docker.com/r/weaveworks/flux-prerelease/tags
This PR implements Generators and Updaters as specified in Generalizing Manifest Factorization in Weave Flux.
One major wart is that Kubernetes doesn't offer Ephemeral containers yet. It's been in the works for quite a while ( kubernetes/kubernetes#59416 ) but until then there is no simple and (reasonably) secure way to run generators and releasers. For now, we will simply assume that the command executables must live in the flux container.
* Remove dependency on `git.Checkout` and rename `checkoutManager` to `fileResourceStore` * Inline configfilemanager and manifestfilemanager into the new `fileResourceStore`
PolicyTranslator exists because the `.flux.yaml` files give commands for updating annotations, rather than updating policies, following on from how KubeYAML was used. But the fact that policies appear as annotations in Kubernetes resources is really up to the code in cluster/kubernetes. This commit changes the format of `.flux.yaml` files so a command for updating _policies_ is supplied, rather than for annotations. All the translation of policies to annotations is then done in cluster/kubernetes. There still needs to be a little code to evaluate the qualified policy updates (i.e., tag_all) against a particular workload, but this can be done without reference to whether they end up as annotations.
squaremo left a comment
This is a substantial amount of work Fons. Well done on the thoughtful restructuring of the code, and pushing the PR through reviews, pre-releases, and other trials.
As a last smoke test, I tried the image built from this branch locally, both with the flux-example repo (and
OK, let's merge this and let it soak in master ..