Open GagarinX opened 3 years ago
Why not just push the new values you want to that branch in a values file and simply pass --revision=<your-new-branch>
in argocd app diff
?
@musabmasood If an Application's source is helm repository, I can't pass my-new-branch
in --revision
, it only accepts chart version.
Summary
There should be a possibility to perform a diff against the live state and a particular revision of a helm app using new values.
For example, I have the following Application deployed:
Say I want to update the values and see what difference will it make, without pushing the updated Application manifest to the git branch that ArgoCD is tracking (e.g.
main
). So I push the updated manifest to a branch, changing the values like this:AFAIK I have no way to perform a diff against the manifest in the branch, because there is no such option for
argocd app diff
command. I can only pass another helm chart version in the--revision
option, and it will not take in consideration the new values from the updated manifest in the branch.Motivation
This feature is crucial to the deployment pipeline that we currently try to make:
argocd app diff
against a live state and a target state from the branch.A human reviews the diff, and merges the branch to main, after which the Application is automatically synced by Argo.
This pipeline works well if we do not change values in the Application, and if the Application source type is kustomize, but if we need to change the values it does not work (new values are not taken in consideration).
Proposal
When using
argocd app diff --revision
on a helm Application, we should pass a git commit SHA to a--revision
option instead of helm chart version (just like we do when the app type is kustomize). ArgoCD then should checkout the Application manifest from the given commit, and perform a diff using the targetRevision AND values from this manifest.