-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to template and render Application's resources #11129
Comments
There are a few different use cases here. We support I think the ApplicationSet case is covered here: #10895
We'd welcome the help! Please let me know what you think of the adding |
Hi @crenshaw-dev! Thank you for the quick response and sorry it took me so long to reply. |
Hasn't It also doesn't actually template a local "Application" manifest; What is required here is for the CLI to receive an application manifest as an input and output the manifests that that application would apply |
I totally agree with @noaabarki and @ShirMonDT that rendering local Helm charts (without involving the ArgoCD server) would be a useful feature. We work exclusively with Helm charts, and the typical workflow when developing a chart is to test it locally before you merge and deploy. I'm currently struggling with ArgoCD NOT rendering a Helm chart properly. We use a strictly declarative model, so for me to "test" ArgoCD rendering, I have to go through the PR cycle. I would much prefer that the ArgoCD CLI render my chart locally, using the same logic the server would, so that I know ArgoCD will handle my chart properly. |
This would be a valuable feature for me as well. We don't want our CI pipeline to have direct access to ArgoCD's API, and we can fetch all Application definitions since they are stored in git. Having an extra flag like |
Is my understanding correct, that the rendered template this is meant to produce will be identical with the template rendered on the server only if no config plugins are used? If so, is there or can there be a way to render templates for review outside of the server with config plugins used? |
From a security perspective this would be a great addition to the project. Allowing local generation of manifest will allow you to utilize security or IAC tooling to scan the manifests for mistakes or issues and fail the deploy process before the manifests ever touch your clusters. TLDR: You shouldn't have to push an application to an argocd/cluster to be able to generate and then scan manifests, at that point you have already pushed either bad code or vulnerable configurations to the cluster. |
Adding another voice, as there are lots of IaC scanning tools that simply assume you can provide a final manifest. To add another wrinkle, I don't even see a manifest option for appsets, which should also have this support. |
I'm simply rendering my manifests during PR time and have the CI job commit the rendered manifests to the PR. That way we can inspect the rendered manifests before we merge it. This doesn't work of course if your rendered manifests contain sensitive info (like secrets), but that's what tools like SealedSecrets are for. In my experience rendering the manifest can be a regular CI step, doesn't need to be performed during CD, and it's actually much more flexible (and much simpler) to render manifests into an open PR. Some other aspects to consider:
Anyway, I thought sharing alternative use-case would be helpful for people. |
I think this would also help the case where one keeps an ArgoCD dependency, like SealedSecrets, updated via ArgoCD itself - but you want to be able to do an initial deploy outside of ArgoCD. Being able to render the manifest of a locally defined SealedSecrets argo app would make this easier. |
Summary
As a user, I'd like to be able to inspect my resources before applying them. One use case would be to debug, lint and verify Helm Charts before deploying them. Another use-case would be to validate resources(plain or via Helm/Kustomize) for misconfigurations and ensure they comply with pre-defined policies. To do so, I need to be able to template and inspect the applied resources right before they are being applied without affecting cluster.
Motivation
When working with ArgoCD it can be very difficult to template and output the objects that will be applied for inspection.
One example is when using App-Of-App and ApplicationSet, these patterns delegate the majority of the templating work to Argo and therefore, make it harder to properly inspect the objects that eventually will be applied to the cluster.
Another example would be using Helm Charts and overriding values.yaml in an Application manifest. As a user, I can't create templates for my resources since Argo is responsible for templating them.
This feature will allow any user keep production-clusters stable and secured while shifting-left validation processes to an earlier stages.
Additionally, in Datree, we see more and more companies that uses ArgoCD and look for ways to prevent misconfigurations in the CI. As one of Datree’s maintainers, I’ll be happy to partership and assist with the work to help both out users and the entire ArgoCD community validate their resources more easily, prevent misconfigurations.
Proposal
The text was updated successfully, but these errors were encountered: