How to view rendered manifests in CI #4961
-
I am trying to find a way to view the rendered manifests diffs for each environment in a PR to my main branch. I was trying to use Kargo Render to generate PRs to the target environment branches but since it is (getting) archived, I am curious if there is another option to be able to do this? I was thinking to create the PR to the target branches with Kargo Render using GIthub Actions, and then, after merging the PR to main, Kargo would promote each stage by merging the PRs but @krancour mentioned this has some problems and is not recommended. Ideally, I would also be able to pass the target PR diffs to a log pattern analyzer tool like klp to get a high level view of the changes to all environments. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@pvickery-ParamountCommerce thank you for moving the conversation to a dedicated thread. 😄
First, I want to suggest we strike "CI" from the conversation. Kargo was built around the notion that CI platforms were being over-leveraged to do "CD" things because CD platforms weren't offering any solution to the common problem of "how do I move changes from environment to environment in a controlled fashion?" CI platforms tend to be a bit more general-purpose / open-ended than CD platforms in terms of capability, so it was natural for people to fall back on them to roll their own solutions. But no matter how hard one tries, CI is bad at these things. CI: Good at synchronous processes. Example: Lint my code, run my unit tests, build a container image, push the image to a repository -- and do it all as fast as possible. CD: Tends to be much more asynchronous. Software gets deployed to some environment and tends to sit there for some time while automated or manual tests are performed, stakeholders review and sign off, etc. Kargo was predicated on making a crisp distinction between CI and CD and filling the capability vacuum in the CD space that led to over-leveraging CI and putting square pegs (CD problems) in round holes (CI platforms). Repositories are the rendezvous point between CI and CD. CI should produce artifacts and push them somewhere. CD should pick them up and take it from there. And configuration (e.g. Kubernetes manifests) is a kind of artifact.
A bit of history: Kargo came first. In the early days of the project, we knew we really loved the "rendered branches" pattern -- the idea of taking Helm charts or manifests + When we used Kargo Render ourselves, our use looked pretty similar to what you've been describing. Someone would commit something to This is very close to what you're doing or wanting to do. You'd proposed Kargo Render opening all these PRs for you "up front" and then Kargo carries out promotions by merging these existing PRs. tbh, this feels like chaos. To round out the history, as Kargo became more capable and less opinionated over time, and we came to trust it more (we dogfood it heavily), Kargo became capable of doing the good things Kargo Render had been doing, but in a far more controlled and less chaotic fashion and that was the point where we decided Kargo Render had no more life left in it as a separate piece of tech. The canonical way of addressing your use case in Kargo, without Kargo Render, is this:
Recap: You got to review changes every step of the way. No unnecessary PRs were ever opened. (i.e. If you didn't like the changes to test, you didn't have to go close PRs with the corresponding changes to staging and prod). And Kargo was in-control of the whole business of moving changes from environment to environment. Once Kargo saw the artifacts that had been published by CI, it took things the rest of the way, without leaning on CI to automate any parts of the process. Here's a slightly simplified version of the above (without the PRs) straight from the docs: https://docs.kargo.io/user-guide/how-to-guides/working-with-stages#promotion-templates
When the PR is open, go crazy. Use whatever automation, tools, or processes you like to decided whether you like what you see and want to merge so the Promotion proceeds, or close, to halt the Promotion. |
Beta Was this translation helpful? Give feedback.
@pvickery-ParamountCommerce thank you for moving the conversation to a dedicated thread. 😄
First, I want to suggest we strike "CI" from the conversation. Kargo was built around the notion that CI platforms were being over-leveraged to do "CD" things because CD platforms weren't offering any solution to the common problem of "how do I move changes from environment to environment in a controlled fashion?" CI platforms tend to be a bit more general-purpose / open-ended than CD platforms in terms of capability, so it was natural for people to fall back on them to roll their own solutions. But no matter how hard one tries, CI is bad at these things.
CI: G…