|
| 1 | +# Comparison of GitOps Promotion Tools |
| 2 | + |
| 3 | +A GitOps user defines their desired state as files in a git repo. To deploy a change, the user modifies a file and |
| 4 | +pushes a commit. To automatically promote that change, you need a system that knows these things: |
| 5 | + |
| 6 | +1. What to promote |
| 7 | + |
| 8 | + Some stuff makes sense to promote, and some does not. You generally want to promote image tag upgrades. But you |
| 9 | + generally don't want to promote environment-specific config like resource requests/limits. The tool needs a way of |
| 10 | + knowing what's promotable and what is not. |
| 11 | + |
| 12 | +2. How to "hold" a change before promotion |
| 13 | + |
| 14 | + The promotion tool needs somewhere to keep a change while it's waiting to be qualified for the next higher |
| 15 | + environment. |
| 16 | + |
| 17 | +3. When to make the change live |
| 18 | + |
| 19 | + For "promotion" to be useful, there must be rules about when a change proceeds to the next step. The promotion tool |
| 20 | + needs a way to determine what qualifying rules apply to which environments. |
| 21 | + |
| 22 | +Different tools have different ways of handling these three concepts. Below we summarize the tools, in the order they |
| 23 | +were introduced. |
| 24 | + |
| 25 | +## The Options at a Glance |
| 26 | + |
| 27 | +| Tool | What to promote | How to "hold" the change | When to promote | |
| 28 | +|----------------------------|-------------------------------------------------|-------------------------------------------------------|-----------------------------------------------------| |
| 29 | +| **GitOps Promoter** | Environment hydrated manifests | Automated PR (hydrated branch) | When commit status and branch protection rules pass | |
| 30 | +| **Home-Grown CI Solution** | Whatever you want | Whatever you want | Whatever you want | |
| 31 | +| **Telefonistka** | Environment directory contents | Automated PR (DRY branch) | When branch protection rules pass | |
| 32 | +| **Kargo** | git commits, image tags, or Helm chart versions | A variety of options (PRs, commits, out-of-sync apps) | Defined by a DAG and a variety of rules | |
| 33 | +| **Codefresh Products** | json-path-specified fields | Codefresh backend | Manually or according to promotion rules | |
| 34 | + |
| 35 | +## GitOps Promoter |
| 36 | + |
| 37 | +Where other tools mostly operate on "DRY," pre-hydrated manifests, GitOps Promoter doesn't touch those files. |
| 38 | +Instead, the user is expected to make a manifest change to affect all target environments (e.g. an image tag bump in a |
| 39 | +shared Kustomize base or a global Helm values file), and the Promoter will open PRs to environment-specific "hydrated |
| 40 | +manifest" branches. |
| 41 | + |
| 42 | +1. What to promote: hydrated manifests for each environment |
| 43 | +2. How to "hold" the change: open a PR against the hydrated manifest branch |
| 44 | +3. When to promote: when specified commit status checks pass, and when branch protection rules pass |
| 45 | + |
| 46 | +## Home-Grown CI Solution |
| 47 | + |
| 48 | +The original solution was to write your own promoter using whatever CI tool you already used (Jenkins, GitHub Actions, |
| 49 | +Argo Workflows, etc.). It's a lot of work, and it's totally on you to make the design. |
| 50 | + |
| 51 | +## Telefonistka |
| 52 | + |
| 53 | +[Telefonistka](https://github.com/wayfair-incubator/telefonistka) relies on the opinion that all the |
| 54 | +stuff-to-be-promoted ought to be stored in an environment-specific directory. The promotion process is a simple |
| 55 | +copy/paste of the contents of one environment directory to the next environment directory, represented as an automated |
| 56 | +PR. The PR may optionally be auto-merged. |
| 57 | + |
| 58 | +1. What to promote: files in an environment-specific directory |
| 59 | +2. How to "hold" the change: open a PR copying files to next environment |
| 60 | +3. When to promote: when PR branch protection conditions pass |
| 61 | + |
| 62 | +## Kargo |
| 63 | + |
| 64 | +[Kargo](https://github.com/akuity/kargo) introduces its own terminology to abstract away common GitOps concepts |
| 65 | +(git/artifact repos are "warehouses", git commits and image tags are "freight," etc.). It's a relatively unopinionated |
| 66 | +toolkit of GitOps promotion-related functionality (opening PRs, pushing commits, syncing Argo CD apps, etc.) which may |
| 67 | +be assembled in a DAG. You can interact with the DAG via a custom UI/CLI. |
| 68 | + |
| 69 | +1. What to promote: "freight," i.e. git commits, image tags, or Helm chart versions (optionally selected by semver range) |
| 70 | +2. How to "hold" the change: a variety of options are available such as opening a PR, waiting to sync an Argo CD app, |
| 71 | + pushing a commit, leaving "freight" as "unqualified" (represented as status fields on CRs) |
| 72 | +3. When to promote: defined by a DAG and a variety of rules such as manual approval or Argo CD app health |
| 73 | + |
| 74 | +## Codefresh Products |
| 75 | + |
| 76 | +This tool uses file selectors and json paths. You can structure your git repo however you want. Then you write file |
| 77 | +selectors and json paths to determine which parts of the repo should be moved from file to file. For example, if your |
| 78 | +app is structured as a Helm chart with environment-specific values files, you can define your promotion rules to copy |
| 79 | +the .image.tag field from the values-dev.yaml file to the values-prod.yaml file. |
| 80 | + |
| 81 | +1. What to promote: json-path-specified fields from lower-env yaml files to higher-env files |
| 82 | +2. How to "hold" the change: Codefresh backend |
| 83 | +3. When to promote: manually or according to promotion rules (TODO: further research this part) |
| 84 | + |
0 commit comments